Anda di halaman 1dari 746

tChild);

},
fullscreen: function pdfViewFullscreen() {
var isFullscreen = document.fullscreenElement || document.mozFullScreen ||
document.webkitIsFullScreen;
if (isFullscreen) {
return false;
}
var wrapper = document.getElementById('viewerContainer');
if (document.documentElement.requestFullscreen) {
wrapper.requestFullscreen();
} else if (document.documentElement.mozRequestFullScreen) {
wrapper.mozRequestFullScreen();
} else if (document.documentElement.webkitRequestFullScreen) {
wrapper.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
} else {
return false;
}
this.isFullscreen = true;
var currentPage = this.pages[this.page - 1];
this.previousScale = this.currentScaleValue;
this.parseScale('page-fit', true);
// Wait for fullscreen to take effect
setTimeout(function() {
currentPage.scrollIntoView();
}, 0);
this.showPresentationControls();
return true;

},

exitFullscreen: function pdfViewExitFullscreen() {


this.isFullscreen = false;
this.parseScale(this.previousScale);
this.page = this.page;
this.clearMouseScrollState();
this.hidePresentationControls();
},
showPresentationControls: function pdfViewShowPresentationControls() {
var DELAY_BEFORE_HIDING_CONTROLS = 3000;
var wrapper = document.getElementById('viewerContainer');
if (this.presentationControlsTimeout) {
clearTimeout(this.presentationControlsTimeout);
} else {
wrapper.classList.add('presentationControls');
}
this.presentationControlsTimeout = setTimeout(function hideControls() {
wrapper.classList.remove('presentationControls');
delete PDFView.presentationControlsTimeout;
}, DELAY_BEFORE_HIDING_CONTROLS);
},
hidePresentationControls: function pdfViewShowPresentationControls() {
if (!this.presentationControlsTimeout) {

return;
}
clearTimeout(this.presentationControlsTimeout);
delete this.presentationControlsTimeout;
var wrapper = document.getElementById('viewerContainer');
wrapper.classList.remove('presentationControls');

},

rotatePages: function pdfViewPageRotation(delta) {


this.pageRotation = (this.pageRotation + 360 + delta) % 360;
for (var i = 0, l = this.pages.length; i < l; i++) {
var page = this.pages[i];
page.update(page.scale, this.pageRotation);
}
for (var i = 0, l = this.thumbnails.length; i < l; i++) {
var thumb = this.thumbnails[i];
thumb.updateRotation(this.pageRotation);
}
var currentPage = this.pages[this.page - 1];
this.parseScale(this.currentScaleValue, true);
this.renderHighestPriority();
// Wait for fullscreen to take effect
setTimeout(function() {
currentPage.scrollIntoView();
}, 0);

},

/**
* This function flips the page in presentation mode if the user scrolls up
* or down with large enough motion and prevents page flipping too often.
*
* @this {PDFView}
* @param {number} mouseScrollDelta The delta value from the mouse event.
*/
mouseScroll: function pdfViewMouseScroll(mouseScrollDelta) {
var MOUSE_SCROLL_COOLDOWN_TIME = 50;
var currentTime = (new Date()).getTime();
var storedTime = this.mouseScrollTimeStamp;
// In case one page has already been flipped there is a cooldown time
// which has to expire before next page can be scrolled on to.
if (currentTime > storedTime &&
currentTime - storedTime < MOUSE_SCROLL_COOLDOWN_TIME)
return;
// In case the user decides to scroll to the opposite direction than before
// clear the accumulated delta.
if ((this.mouseScrollDelta > 0 && mouseScrollDelta < 0) ||
(this.mouseScrollDelta < 0 && mouseScrollDelta > 0))
this.clearMouseScrollState();

this.mouseScrollDelta += mouseScrollDelta;
var PAGE_FLIP_THRESHOLD = 120;
if (Math.abs(this.mouseScrollDelta) >= PAGE_FLIP_THRESHOLD) {
var PageFlipDirection = {
UP: -1,
DOWN: 1
};
// In fullscreen mode scroll one page at a time.
var pageFlipDirection = (this.mouseScrollDelta > 0) ?
PageFlipDirection.UP :
PageFlipDirection.DOWN;
this.clearMouseScrollState();
var currentPage = this.page;
// In case we are already on the first or the last page there is no need
// to do anything.
if ((currentPage == 1 && pageFlipDirection == PageFlipDirection.UP) ||
(currentPage == this.pages.length &&
pageFlipDirection == PageFlipDirection.DOWN))
return;

this.page += pageFlipDirection;
this.mouseScrollTimeStamp = currentTime;

},

/**
* This function clears the member attributes used with mouse scrolling in
* presentation mode.
*
* @this {PDFView}
*/
clearMouseScrollState: function pdfViewClearMouseScrollState() {
this.mouseScrollTimeStamp = 0;
this.mouseScrollDelta = 0;
}

};

var PageView = function pageView(container, pdfPage, id, scale,


stats, navigateTo) {
this.id = id;
this.pdfPage = pdfPage;
this.rotation = 0;
this.scale = scale || 1.0;
this.viewport = this.pdfPage.getViewport(this.scale, this.pdfPage.rotate);
this.renderingState = RenderingStates.INITIAL;
this.resume = null;
this.textContent = null;
this.textLayer = null;
var anchor = document.createElement('a');
anchor.name = '' + this.id;
var div = this.el = document.createElement('div');

div.id = 'pageContainer' + this.id;


div.className = 'page';
div.style.width = Math.floor(this.viewport.width) + 'px';
div.style.height = Math.floor(this.viewport.height) + 'px';
container.appendChild(anchor);
container.appendChild(div);
this.destroy = function pageViewDestroy() {
this.update();
this.pdfPage.destroy();
};
this.update = function pageViewUpdate(scale, rotation) {
this.renderingState = RenderingStates.INITIAL;
this.resume = null;
if (typeof rotation !== 'undefined') {
this.rotation = rotation;
}
this.scale = scale || this.scale;
var totalRotation = (this.rotation + this.pdfPage.rotate) % 360;
var viewport = this.pdfPage.getViewport(this.scale, totalRotation);
this.viewport = viewport;
div.style.width = Math.floor(viewport.width) + 'px';
div.style.height = Math.floor(viewport.height) + 'px';
while (div.hasChildNodes())
div.removeChild(div.lastChild);
div.removeAttribute('data-loaded');
delete this.canvas;
this.loadingIconDiv = document.createElement('div');
this.loadingIconDiv.className = 'loadingIcon';
div.appendChild(this.loadingIconDiv);

};

Object.defineProperty(this, 'width', {
get: function PageView_getWidth() {
return this.viewport.width;
},
enumerable: true
});
Object.defineProperty(this, 'height', {
get: function PageView_getHeight() {
return this.viewport.height;
},
enumerable: true
});
function setupAnnotations(pdfPage, viewport) {
function bindLink(link, dest) {
link.href = PDFView.getDestinationHash(dest);
link.onclick = function pageViewSetupLinksOnclick() {
if (dest)

PDFView.navigateTo(dest);
return false;

};
}
function createElementWithStyle(tagName, item, rect) {
if (!rect) {
rect = viewport.convertToViewportRectangle(item.rect);
rect = PDFJS.Util.normalizeRect(rect);
}
var element = document.createElement(tagName);
element.style.left = Math.floor(rect[0]) + 'px';
element.style.top = Math.floor(rect[1]) + 'px';
element.style.width = Math.ceil(rect[2] - rect[0]) + 'px';
element.style.height = Math.ceil(rect[3] - rect[1]) + 'px';
return element;
}
function createTextAnnotation(item) {
var container = document.createElement('section');
container.className = 'annotText';
var rect = viewport.convertToViewportRectangle(item.rect);
rect = PDFJS.Util.normalizeRect(rect);
// sanity check because of OOo-generated PDFs
if ((rect[3] - rect[1]) < ANNOT_MIN_SIZE) {
rect[3] = rect[1] + ANNOT_MIN_SIZE;
}
if ((rect[2] - rect[0]) < ANNOT_MIN_SIZE) {
rect[2] = rect[0] + (rect[3] - rect[1]); // make it square
}
var image = createElementWithStyle('img', item, rect);
var iconName = item.name;
image.src = IMAGE_DIR + 'annotation-' +
iconName.toLowerCase() + '.svg';
image.alt = mozL10n.get('text_annotation_type', {type: iconName},
'[{{type}} Annotation]');
var content = document.createElement('div');
content.setAttribute('hidden', true);
var title = document.createElement('h1');
var text = document.createElement('p');
content.style.left = Math.floor(rect[2]) + 'px';
content.style.top = Math.floor(rect[1]) + 'px';
title.textContent = item.title;
if (!item.content && !item.title) {
content.setAttribute('hidden', true);
} else {
var e = document.createElement('span');
var lines = item.content.split(/(?:\r\n?|\n)/);
for (var i = 0, ii = lines.length; i < ii; ++i) {
var line = lines[i];
e.appendChild(document.createTextNode(line));
if (i < (ii - 1))
e.appendChild(document.createElement('br'));
}
text.appendChild(e);
image.addEventListener('mouseover', function annotationImageOver() {
content.removeAttribute('hidden');
}, false);
image.addEventListener('mouseout', function annotationImageOut() {

content.setAttribute('hidden', true);
}, false);

content.appendChild(title);
content.appendChild(text);
container.appendChild(image);
container.appendChild(content);
}

return container;

pdfPage.getAnnotations().then(function(items) {
for (var i = 0; i < items.length; i++) {
var item = items[i];
switch (item.type) {
case 'Link':
var link = createElementWithStyle('a', item);
link.href = item.url || '';
if (!item.url)
bindLink(link, ('dest' in item) ? item.dest : null);
div.appendChild(link);
break;
case 'Text':
var textAnnotation = createTextAnnotation(item);
if (textAnnotation)
div.appendChild(textAnnotation);
break;
}
}
});

this.getPagePoint = function pageViewGetPagePoint(x, y) {


return this.viewport.convertToPdfPoint(x, y);
};
this.scrollIntoView = function pageViewScrollIntoView(dest) {
if (!dest) {
scrollIntoView(div);
return;
}
var x = 0, y = 0;
var width = 0, height = 0, widthScale, heightScale;
var scale = 0;
switch (dest[1].name) {
case 'XYZ':
x = dest[2];
y = dest[3];
scale = dest[4];
break;
case 'Fit':
case 'FitB':
scale = 'page-fit';
break;
case 'FitH':
case 'FitBH':
y = dest[2];
scale = 'page-width';

break;
case 'FitV':
case 'FitBV':
x = dest[2];
scale = 'page-height';
break;
case 'FitR':
x = dest[2];
y = dest[3];
width = dest[4] - x;
height = dest[5] - y;
widthScale = (this.container.clientWidth - SCROLLBAR_PADDING) /
width / CSS_UNITS;
heightScale = (this.container.clientHeight - SCROLLBAR_PADDING) /
height / CSS_UNITS;
scale = Math.min(widthScale, heightScale);
break;
default:
return;

if (scale && scale !== PDFView.currentScale)


PDFView.parseScale(scale, true, true);
else if (PDFView.currentScale === UNKNOWN_SCALE)
PDFView.parseScale(DEFAULT_SCALE, true, true);
var boundingRect = [
this.viewport.convertToViewportPoint(x, y),
this.viewport.convertToViewportPoint(x + width, y + height)
];
setTimeout(function pageViewScrollIntoViewRelayout() {
// letting page to re-layout before scrolling
var scale = PDFView.currentScale;
var x = Math.min(boundingRect[0][0], boundingRect[1][0]);
var y = Math.min(boundingRect[0][1], boundingRect[1][1]);
var width = Math.abs(boundingRect[0][0] - boundingRect[1][0]);
var height = Math.abs(boundingRect[0][1] - boundingRect[1][1]);

};

scrollIntoView(div, {left: x, top: y, width: width, height: height});


}, 0);

this.getTextContent = function pageviewGetTextContent() {


if (!this.textContent) {
this.textContent = this.pdfPage.getTextContent();
}
return this.textContent;
};
this.draw = function pageviewDraw(callback) {
if (this.renderingState !== RenderingStates.INITIAL)
error('Must be in new state before drawing');
this.renderingState = RenderingStates.RUNNING;
var canvas = document.createElement('canvas');
canvas.id = 'page' + this.id;
canvas.mozOpaque = true;
div.appendChild(canvas);
this.canvas = canvas;

var textLayerDiv = null;


if (!PDFJS.disableTextLayer) {
textLayerDiv = document.createElement('div');
textLayerDiv.className = 'textLayer';
div.appendChild(textLayerDiv);
}
var textLayer = this.textLayer =
textLayerDiv ? new TextLayerBuilder(textLayerDiv, this.id - 1) : null;
var scale = this.scale, viewport = this.viewport;
var outputScale = PDFView.getOutputScale();
canvas.width = Math.floor(viewport.width) * outputScale.sx;
canvas.height = Math.floor(viewport.height) * outputScale.sy;
if (outputScale.scaled) {
var cssScale = 'scale(' + (1 / outputScale.sx) + ', ' +
(1 / outputScale.sy) + ')';
CustomStyle.setProp('transform' , canvas, cssScale);
CustomStyle.setProp('transformOrigin' , canvas, '0% 0%');
if (textLayerDiv) {
CustomStyle.setProp('transform' , textLayerDiv, cssScale);
CustomStyle.setProp('transformOrigin' , textLayerDiv, '0% 0%');
}
}
var ctx = canvas.getContext('2d');
ctx.save();
ctx.fillStyle = 'rgb(255, 255, 255)';
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.restore();
if (outputScale.scaled) {
ctx.scale(outputScale.sx, outputScale.sy);
}
// Rendering area
var self = this;
function pageViewDrawCallback(error) {
self.renderingState = RenderingStates.FINISHED;
if (self.loadingIconDiv) {
div.removeChild(self.loadingIconDiv);
delete self.loadingIconDiv;
}
if (error) {
PDFView.error(mozL10n.get('rendering_error', null,
'An error occurred while rendering the page.'), error);
}
self.stats = pdfPage.stats;
self.updateStats();
if (self.onAfterDraw)
self.onAfterDraw();

cache.push(self);
callback();

var renderContext = {
canvasContext: ctx,
viewport: this.viewport,
textLayer: textLayer,
continueCallback: function pdfViewcContinueCallback(cont) {
if (PDFView.highestPriorityPage !== 'page' + self.id) {
self.renderingState = RenderingStates.PAUSED;
self.resume = function resumeCallback() {
self.renderingState = RenderingStates.RUNNING;
cont();
};
return;
}
cont();
}
};
this.pdfPage.render(renderContext).then(
function pdfPageRenderCallback() {
pageViewDrawCallback(null);
},
function pdfPageRenderError(error) {
pageViewDrawCallback(error);
}
);
if (textLayer) {
this.getTextContent().then(
function textContentResolved(textContent) {
textLayer.setTextContent(textContent);
}
);
}
setupAnnotations(this.pdfPage, this.viewport);
div.setAttribute('data-loaded', true);

};

this.beforePrint = function pageViewBeforePrint() {


var pdfPage = this.pdfPage;
var viewport = pdfPage.getViewport(1);
// Use the same hack we use for high dpi displays for printing to get better
// output until bug 811002 is fixed in FF.
var PRINT_OUTPUT_SCALE = 2;
var canvas = this.canvas = document.createElement('canvas');
canvas.width = Math.floor(viewport.width) * PRINT_OUTPUT_SCALE;
canvas.height = Math.floor(viewport.height) * PRINT_OUTPUT_SCALE;
canvas.style.width = (PRINT_OUTPUT_SCALE * viewport.width) + 'pt';
canvas.style.height = (PRINT_OUTPUT_SCALE * viewport.height) + 'pt';
var cssScale = 'scale(' + (1 / PRINT_OUTPUT_SCALE) + ', ' +
(1 / PRINT_OUTPUT_SCALE) + ')';
CustomStyle.setProp('transform' , canvas, cssScale);
CustomStyle.setProp('transformOrigin' , canvas, '0% 0%');
var printContainer = document.getElementById('printContainer');
printContainer.appendChild(canvas);
var self = this;
canvas.mozPrintCallback = function(obj) {
var ctx = obj.context;

ctx.save();
ctx.fillStyle = 'rgb(255, 255, 255)';
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.restore();
ctx.scale(PRINT_OUTPUT_SCALE, PRINT_OUTPUT_SCALE);
var renderContext = {
canvasContext: ctx,
viewport: viewport
};
pdfPage.render(renderContext).then(function() {
// Tell the printEngine that rendering this canvas/page has finished.
obj.done();
self.pdfPage.destroy();
}, function(error) {
console.error(error);
// Tell the printEngine that rendering this canvas/page has failed.
// This will make the print proces stop.
if ('abort' in object)
obj.abort();
else
obj.done();
self.pdfPage.destroy();
});

};

};

this.updateStats = function pageViewUpdateStats() {


if (PDFJS.pdfBug && Stats.enabled) {
var stats = this.stats;
Stats.add(this.id, stats);
}
};

};

var ThumbnailView = function thumbnailView(container, pdfPage, id) {


var anchor = document.createElement('a');
anchor.href = PDFView.getAnchorUrl('#page=' + id);
anchor.title = mozL10n.get('thumb_page_title', {page: id}, 'Page {{page}}');
anchor.onclick = function stopNavigation() {
PDFView.page = id;
return false;
};
var rotation = 0;
var totalRotation = (rotation + pdfPage.rotate) % 360;
var viewport = pdfPage.getViewport(1, totalRotation);
var pageWidth = this.width = viewport.width;
var pageHeight = this.height = viewport.height;
var pageRatio = pageWidth / pageHeight;
this.id = id;
var
var
var
var

canvasWidth = 98;
canvasHeight = canvasWidth / this.width * this.height;
scaleX = this.scaleX = (canvasWidth / pageWidth);
scaleY = this.scaleY = (canvasHeight / pageHeight);

var div = this.el = document.createElement('div');


div.id = 'thumbnailContainer' + id;

div.className = 'thumbnail';
var ring = document.createElement('div');
ring.className = 'thumbnailSelectionRing';
ring.style.width = canvasWidth + 'px';
ring.style.height = canvasHeight + 'px';
div.appendChild(ring);
anchor.appendChild(div);
container.appendChild(anchor);
this.hasImage = false;
this.renderingState = RenderingStates.INITIAL;
this.updateRotation = function(rot) {
rotation = rot;
totalRotation = (rotation + pdfPage.rotate) % 360;
viewport = pdfPage.getViewport(1, totalRotation);
pageWidth = this.width = viewport.width;
pageHeight = this.height = viewport.height;
pageRatio = pageWidth / pageHeight;
canvasHeight = canvasWidth / this.width * this.height;
scaleX = this.scaleX = (canvasWidth / pageWidth);
scaleY = this.scaleY = (canvasHeight / pageHeight);
div.removeAttribute('data-loaded');
ring.textContent = '';
ring.style.width = canvasWidth + 'px';
ring.style.height = canvasHeight + 'px';

this.hasImage = false;
this.renderingState = RenderingStates.INITIAL;
this.resume = null;

function getPageDrawContext() {
var canvas = document.createElement('canvas');
canvas.id = 'thumbnail' + id;
canvas.mozOpaque = true;
canvas.width = canvasWidth;
canvas.height = canvasHeight;
canvas.className = 'thumbnailImage';
canvas.setAttribute('aria-label', mozL10n.get('thumb_page_canvas',
{page: id}, 'Thumbnail of Page {{page}}'));
div.setAttribute('data-loaded', true);
ring.appendChild(canvas);

var ctx = canvas.getContext('2d');


ctx.save();
ctx.fillStyle = 'rgb(255, 255, 255)';
ctx.fillRect(0, 0, canvasWidth, canvasHeight);
ctx.restore();
return ctx;

this.drawingRequired = function thumbnailViewDrawingRequired() {


return !this.hasImage;
};
this.draw = function thumbnailViewDraw(callback) {
if (this.renderingState !== RenderingStates.INITIAL)
error('Must be in new state before drawing');
this.renderingState = RenderingStates.RUNNING;
if (this.hasImage) {
callback();
return;
}
var self = this;
var ctx = getPageDrawContext();
var drawViewport = pdfPage.getViewport(scaleX, totalRotation);
var renderContext = {
canvasContext: ctx,
viewport: drawViewport,
continueCallback: function(cont) {
if (PDFView.highestPriorityPage !== 'thumbnail' + self.id) {
self.renderingState = RenderingStates.PAUSED;
self.resume = function() {
self.renderingState = RenderingStates.RUNNING;
cont();
};
return;
}
cont();
}
};
pdfPage.render(renderContext).then(
function pdfPageRenderCallback() {
self.renderingState = RenderingStates.FINISHED;
callback();
},
function pdfPageRenderError(error) {
self.renderingState = RenderingStates.FINISHED;
callback();
}
);
this.hasImage = true;

};

this.setImage = function thumbnailViewSetImage(img) {


if (this.hasImage || !img)
return;
this.renderingState = RenderingStates.FINISHED;
var ctx = getPageDrawContext();
ctx.drawImage(img, 0, 0, img.width, img.height,
0, 0, ctx.canvas.width, ctx.canvas.height);
this.hasImage = true;

};

};

var DocumentOutlineView = function documentOutlineView(outline) {


var outlineView = document.getElementById('outlineView');
while (outlineView.firstChild)

outlineView.removeChild(outlineView.firstChild);
function bindItemLink(domObj, item) {
domObj.href = PDFView.getDestinationHash(item.dest);
domObj.onclick = function documentOutlineViewOnclick(e) {
PDFView.navigateTo(item.dest);
return false;
};
}
if (!outline) {
var noOutline = document.createElement('div');
noOutline.classList.add('noOutline');
noOutline.textContent = mozL10n.get('no_outline', null,
'No Outline Available');
outlineView.appendChild(noOutline);
return;
}
var queue = [{parent: outlineView, items: outline}];
while (queue.length > 0) {
var levelData = queue.shift();
var i, n = levelData.items.length;
for (i = 0; i < n; i++) {
var item = levelData.items[i];
var div = document.createElement('div');
div.className = 'outlineItem';
var a = document.createElement('a');
bindItemLink(a, item);
a.textContent = item.title;
div.appendChild(a);
if (item.items.length > 0) {
var itemsDiv = document.createElement('div');
itemsDiv.className = 'outlineItems';
div.appendChild(itemsDiv);
queue.push({parent: itemsDiv, items: item.items});
}

levelData.parent.appendChild(div);

};

// optimised CSS custom property getter/setter


var CustomStyle = (function CustomStyleClosure() {
// As noted on: http://www.zachstronaut.com/posts/2009/02/17/
//
animate-css-transforms-firefox-webkit.html
// in some versions of IE9 it is critical that ms appear in this list
// before Moz
var prefixes = ['ms', 'Moz', 'Webkit', 'O'];
var _cache = { };
function CustomStyle() {
}
CustomStyle.getProp = function get(propName, element) {
// check cache only when no element is given
if (arguments.length == 1 && typeof _cache[propName] == 'string') {

return _cache[propName];

element = element || document.documentElement;


var style = element.style, prefixed, uPropName;
// test standard property first
if (typeof style[propName] == 'string') {
return (_cache[propName] = propName);
}
// capitalize
uPropName = propName.charAt(0).toUpperCase() + propName.slice(1);
// test vendor specific properties
for (var i = 0, l = prefixes.length; i < l; i++) {
prefixed = prefixes[i] + uPropName;
if (typeof style[prefixed] == 'string') {
return (_cache[propName] = prefixed);
}
}
//if all fails then set to undefined
return (_cache[propName] = 'undefined');

};

CustomStyle.setProp = function set(propName, element, str) {


var prop = this.getProp(propName);
if (prop != 'undefined')
element.style[prop] = str;
};
return CustomStyle;
})();
var TextLayerBuilder = function textLayerBuilder(textLayerDiv, pageIdx) {
var textLayerFrag = document.createDocumentFragment();
this.textLayerDiv = textLayerDiv;
this.layoutDone = false;
this.divContentDone = false;
this.pageIdx = pageIdx;
this.matches = [];
this.beginLayout = function textLayerBuilderBeginLayout() {
this.textDivs = [];
this.textLayerQueue = [];
this.renderingDone = false;
};
this.endLayout = function textLayerBuilderEndLayout() {
this.layoutDone = true;
this.insertDivContent();
};
this.renderLayer = function textLayerBuilderRenderLayer() {
var self = this;
var textDivs = this.textDivs;
var textLayerDiv = this.textLayerDiv;
var canvas = document.createElement('canvas');

var ctx = canvas.getContext('2d');


// No point in rendering so many divs as it'd make the browser unusable
// even after the divs are rendered
var MAX_TEXT_DIVS_TO_RENDER = 100000;
if (textDivs.length > MAX_TEXT_DIVS_TO_RENDER)
return;
for (var i = 0, ii = textDivs.length; i < ii; i++) {
var textDiv = textDivs[i];
textLayerFrag.appendChild(textDiv);
ctx.font = textDiv.style.fontSize + ' ' + textDiv.style.fontFamily;
var width = ctx.measureText(textDiv.textContent).width;
if (width > 0) {
var textScale = textDiv.dataset.canvasWidth / width;
CustomStyle.setProp('transform' , textDiv,
'scale(' + textScale + ', 1)');
CustomStyle.setProp('transformOrigin' , textDiv, '0% 0%');

textLayerDiv.appendChild(textDiv);

this.renderingDone = true;
this.updateMatches();
textLayerDiv.appendChild(textLayerFrag);

};

this.setupRenderLayoutTimer = function textLayerSetupRenderLayoutTimer() {


// Schedule renderLayout() if user has been scrolling, otherwise
// run it right away
var RENDER_DELAY = 200; // in ms
var self = this;
if (Date.now() - PDFView.lastScroll > RENDER_DELAY) {
// Render right away
this.renderLayer();
} else {
// Schedule
if (this.renderTimer)
clearTimeout(this.renderTimer);
this.renderTimer = setTimeout(function() {
self.setupRenderLayoutTimer();
}, RENDER_DELAY);
}
};
this.appendText = function textLayerBuilderAppendText(geom) {
var textDiv = document.createElement('div');
// vScale and hScale already contain the scaling to pixel units
var fontHeight = geom.fontSize * geom.vScale;
textDiv.dataset.canvasWidth = geom.canvasWidth * geom.hScale;
textDiv.dataset.fontName = geom.fontName;
textDiv.style.fontSize = fontHeight + 'px';
textDiv.style.fontFamily = geom.fontFamily;

textDiv.style.left = geom.x + 'px';


textDiv.style.top = (geom.y - fontHeight) + 'px';
// The content of the div is set in the `setTextContent` function.
this.textDivs.push(textDiv);

};

this.insertDivContent = function textLayerUpdateTextContent() {


// Only set the content of the divs once layout has finished, the content
// for the divs is available and content is not yet set on the divs.
if (!this.layoutDone || this.divContentDone || !this.textContent)
return;
this.divContentDone = true;
var textDivs = this.textDivs;
var bidiTexts = this.textContent.bidiTexts;
for (var i = 0; i < bidiTexts.length; i++) {
var bidiText = bidiTexts[i];
var textDiv = textDivs[i];

textDiv.textContent = bidiText.str;
textDiv.dir = bidiText.ltr ? 'ltr' : 'rtl';

this.setupRenderLayoutTimer();

};

this.setTextContent = function textLayerBuilderSetTextContent(textContent) {


this.textContent = textContent;
this.insertDivContent();
};
this.convertMatches = function textLayerBuilderConvertMatches(matches) {
var i = 0;
var iIndex = 0;
var bidiTexts = this.textContent.bidiTexts;
var end = bidiTexts.length - 1;
var queryLen = PDFFindController.state.query.length;
var lastDivIdx = -1;
var pos;
var ret = [];
// Loop over all the matches.
for (var m = 0; m < matches.length; m++) {
var matchIdx = matches[m];
// # Calculate the begin position.
// Loop over the divIdxs.
while (i !== end && matchIdx >= (iIndex + bidiTexts[i].str.length)) {
iIndex += bidiTexts[i].str.length;
i++;
}
// TODO: Do proper handling here if something goes wrong.
if (i == bidiTexts.length) {

console.error('Could not find matching mapping');

var match = {
begin: {
divIdx: i,
offset: matchIdx - iIndex
}
};
// # Calculate the end position.
matchIdx += queryLen;
// Somewhat same array as above, but use a > instead of >= to get the end
// position right.
while (i !== end && matchIdx > (iIndex + bidiTexts[i].str.length)) {
iIndex += bidiTexts[i].str.length;
i++;
}

match.end = {
divIdx: i,
offset: matchIdx - iIndex
};
ret.push(match);

return ret;

};

this.renderMatches = function textLayerBuilder_renderMatches(matches) {


// Early exit if there is nothing to render.
if (matches.length === 0) {
return;
}
var
var
var
var
var
var

bidiTexts = this.textContent.bidiTexts;
textDivs = this.textDivs;
prevEnd = null;
isSelectedPage = this.pageIdx === PDFFindController.selected.pageIdx;
selectedMatchIdx = PDFFindController.selected.matchIdx;
highlightAll = PDFFindController.state.highlightAll;

var infty = {
divIdx: -1,
offset: undefined
};
function beginText(begin, className) {
var divIdx = begin.divIdx;
var div = textDivs[divIdx];
div.textContent = '';
var content = bidiTexts[divIdx].str.substring(0, begin.offset);
var node = document.createTextNode(content);
if (className) {
var isSelected = isSelectedPage &&
divIdx === selectedMatchIdx;
var span = document.createElement('span');
span.className = className + (isSelected ? ' selected' : '');

span.appendChild(node);
div.appendChild(span);
return;

}
div.appendChild(node);

function appendText(from, to, className) {


var divIdx = from.divIdx;
var div = textDivs[divIdx];

var content = bidiTexts[divIdx].str.substring(from.offset, to.offset);


var node = document.createTextNode(content);
if (className) {
var span = document.createElement('span');
span.className = className;
span.appendChild(node);
div.appendChild(span);
return;
}
div.appendChild(node);

function highlightDiv(divIdx, className) {


textDivs[divIdx].className = className;
}
var i0 = selectedMatchIdx, i1 = i0 + 1, i;
if (highlightAll) {
i0 = 0;
i1 = matches.length;
} else if (!isSelectedPage) {
// Not highlighting all and this isn't the selected page, so do nothing.
return;
}
for (i = i0; i < i1; i++) {
var match = matches[i];
var begin = match.begin;
var end = match.end;
var isSelected = isSelectedPage && i === selectedMatchIdx;
var highlightSuffix = (isSelected ? ' selected' : '');
if (isSelected)
scrollIntoView(textDivs[begin.divIdx], {top: -50});
// Match inside new div.
if (!prevEnd || begin.divIdx !== prevEnd.divIdx) {
// If there was a previous div, then add the text at the end
if (prevEnd !== null) {
appendText(prevEnd, infty);
}
// clears the divs and set the content until the begin point.
beginText(begin);
} else {
appendText(prevEnd, begin);
}
if (begin.divIdx === end.divIdx) {

appendText(begin, end, 'highlight' + highlightSuffix);


} else {
appendText(begin, infty, 'highlight begin' + highlightSuffix);
for (var n = begin.divIdx + 1; n < end.divIdx; n++) {
highlightDiv(n, 'highlight middle' + highlightSuffix);
}
beginText(end, 'highlight end' + highlightSuffix);
}
prevEnd = end;

if (prevEnd) {
appendText(prevEnd, infty);
}

};

this.updateMatches = function textLayerUpdateMatches() {


// Only show matches, once all rendering is done.
if (!this.renderingDone)
return;
// Clear out all matches.
var matches = this.matches;
var textDivs = this.textDivs;
var bidiTexts = this.textContent.bidiTexts;
var clearedUntilDivIdx = -1;
// Clear out all current matches.
for (var i = 0; i < matches.length; i++) {
var match = matches[i];
var begin = Math.max(clearedUntilDivIdx, match.begin.divIdx);
for (var n = begin; n <= match.end.divIdx; n++) {
var div = textDivs[n];
div.textContent = bidiTexts[n].str;
div.className = '';
}
clearedUntilDivIdx = match.end.divIdx + 1;
}
if (!PDFFindController.active)
return;
// Convert the matches on the page controller into the match format used
// for the textLayer.
this.matches = matches =
this.convertMatches(PDFFindController.pageMatches[this.pageIdx] || []);
this.renderMatches(this.matches);

};

};

document.addEventListener('DOMContentLoaded', function webViewerLoad(evt) {


PDFView.initialize();
var params = PDFView.parseQueryString(document.location.search.substring(1));
var file = window.location.toString()
document.getElementById('openFile').setAttribute('hidden', 'true');
// Special debugging flags in the hash section of the URL.

var hash = document.location.hash.substring(1);


var hashParams = PDFView.parseQueryString(hash);
if ('disableWorker' in hashParams)
PDFJS.disableWorker = (hashParams['disableWorker'] === 'true');
if ('textLayer' in hashParams) {
switch (hashParams['textLayer']) {
case 'off':
PDFJS.disableTextLayer = true;
break;
case 'visible':
case 'shadow':
case 'hover':
var viewer = document.getElementById('viewer');
viewer.classList.add('textLayer-' + hashParams['textLayer']);
break;
}
}
if ('pdfBug' in hashParams && FirefoxCom.requestSync('pdfBugEnabled')) {
PDFJS.pdfBug = true;
var pdfBug = hashParams['pdfBug'];
var enabled = pdfBug.split(',');
PDFBug.enable(enabled);
PDFBug.init();
}
if (!PDFView.supportsPrinting) {
document.getElementById('print').classList.add('hidden');
}
if (!PDFView.supportsFullscreen) {
document.getElementById('fullscreen').classList.add('hidden');
}
if (PDFView.supportsIntegratedFind) {
document.querySelector('#viewFind').classList.add('hidden');
}
// Listen for warnings to trigger the fallback UI. Errors should be caught
// and call PDFView.error() so we don't need to listen for those.
PDFJS.LogManager.addLogger({
warn: function() {
PDFView.fallback();
}
});
var mainContainer = document.getElementById('mainContainer');
var outerContainer = document.getElementById('outerContainer');
mainContainer.addEventListener('transitionend', function(e) {
if (e.target == mainContainer) {
var event = document.createEvent('UIEvents');
event.initUIEvent('resize', false, false, window, 0);
window.dispatchEvent(event);
outerContainer.classList.remove('sidebarMoving');
}
}, true);

document.getElementById('sidebarToggle').addEventListener('click',
function() {
this.classList.toggle('toggled');
outerContainer.classList.add('sidebarMoving');
outerContainer.classList.toggle('sidebarOpen');
PDFView.sidebarOpen = outerContainer.classList.contains('sidebarOpen');
PDFView.renderHighestPriority();
});
document.getElementById('viewThumbnail').addEventListener('click',
function() {
PDFView.switchSidebarView('thumbs');
});
document.getElementById('viewOutline').addEventListener('click',
function() {
PDFView.switchSidebarView('outline');
});
document.getElementById('previous').addEventListener('click',
function() {
PDFView.page--;
});
document.getElementById('next').addEventListener('click',
function() {
PDFView.page++;
});
document.querySelector('.zoomIn').addEventListener('click',
function() {
PDFView.zoomIn();
});
document.querySelector('.zoomOut').addEventListener('click',
function() {
PDFView.zoomOut();
});
document.getElementById('fullscreen').addEventListener('click',
function() {
PDFView.fullscreen();
});
document.getElementById('openFile').addEventListener('click',
function() {
document.getElementById('fileInput').click();
});
document.getElementById('print').addEventListener('click',
function() {
window.print();
});
document.getElementById('download').addEventListener('click',
function() {
PDFView.download();
});
document.getElementById('pageNumber').addEventListener('change',

function() {
PDFView.page = this.value;
});
document.getElementById('scaleSelect').addEventListener('change',
function() {
PDFView.parseScale(this.value);
});
document.getElementById('first_page').addEventListener('click',
function() {
PDFView.page = 1;
});
document.getElementById('last_page').addEventListener('click',
function() {
PDFView.page = PDFView.pdfDocument.numPages;
});
document.getElementById('page_rotate_ccw').addEventListener('click',
function() {
PDFView.rotatePages(-90);
});
document.getElementById('page_rotate_cw').addEventListener('click',
function() {
PDFView.rotatePages(90);
});
if (FirefoxCom.requestSync('getLoadingType') == 'passive') {
PDFView.setTitleUsingUrl(file);
PDFView.initPassiveLoading();
return;
}
PDFView.open(file, 0);
}, true);
function updateViewarea() {
if (!PDFView.initialized)
return;
var visible = PDFView.getVisiblePages();
var visiblePages = visible.views;
if (visiblePages.length === 0) {
return;
}
PDFView.renderHighestPriority();
var currentId = PDFView.page;
var firstPage = visible.first;
for (var i = 0, ii = visiblePages.length, stillFullyVisible = false;
i < ii; ++i) {
var page = visiblePages[i];
if (page.percent < 100)
break;

if (page.id === PDFView.page) {


stillFullyVisible = true;
break;
}

if (!stillFullyVisible) {
currentId = visiblePages[0].id;
}
if (!PDFView.isFullscreen) {
updateViewarea.inProgress = true; // used in "set page"
PDFView.page = currentId;
updateViewarea.inProgress = false;
}
var currentScale = PDFView.currentScale;
var currentScaleValue = PDFView.currentScaleValue;
var normalizedScaleValue = currentScaleValue == currentScale ?
currentScale * 100 : currentScaleValue;
var pageNumber = firstPage.id;
var pdfOpenParams = '#page=' + pageNumber;
pdfOpenParams += '&zoom=' + normalizedScaleValue;
var currentPage = PDFView.pages[pageNumber - 1];
var topLeft = currentPage.getPagePoint(PDFView.container.scrollLeft,
(PDFView.container.scrollTop - firstPage.y));
pdfOpenParams += ',' + Math.round(topLeft[0]) + ',' + Math.round(topLeft[1]);

var store = PDFView.store;


store.initializedPromise.then(function() {
store.set('exists', true);
store.set('page', pageNumber);
store.set('zoom', normalizedScaleValue);
store.set('scrollLeft', Math.round(topLeft[0]));
store.set('scrollTop', Math.round(topLeft[1]));
});
var href = PDFView.getAnchorUrl(pdfOpenParams);
document.getElementById('viewBookmark').href = href;

window.addEventListener('resize', function webViewerResize(evt) {


if (PDFView.initialized &&
(document.getElementById('pageWidthOption').selected ||
document.getElementById('pageFitOption').selected ||
document.getElementById('pageAutoOption').selected))
PDFView.parseScale(document.getElementById('scaleSelect').value);
updateViewarea();
});
window.addEventListener('hashchange', function webViewerHashchange(evt) {
PDFView.setHash(document.location.hash.substring(1));
});
window.addEventListener('change', function webViewerChange(evt) {
var files = evt.target.files;
if (!files || files.length == 0)
return;
// Read the local file into a Uint8Array.

var fileReader = new FileReader();


fileReader.onload = function webViewerChangeFileReaderOnload(evt) {
var buffer = evt.target.result;
var uint8Array = new Uint8Array(buffer);
PDFView.open(uint8Array, 0);
};
var file = files[0];
fileReader.readAsArrayBuffer(file);
PDFView.setTitleUsingUrl(file.name);
// URL does not reflect proper document location - hiding some icons.
document.getElementById('viewBookmark').setAttribute('hidden', 'true');
document.getElementById('download').setAttribute('hidden', 'true');
}, true);
function selectScaleOption(value) {
var options = document.getElementById('scaleSelect').options;
var predefinedValueFound = false;
for (var i = 0; i < options.length; i++) {
var option = options[i];
if (option.value != value) {
option.selected = false;
continue;
}
option.selected = true;
predefinedValueFound = true;
}
return predefinedValueFound;
}
window.addEventListener('localized', function localized(evt) {
document.getElementsByTagName('html')[0].dir = mozL10n.language.direction;
}, true);
window.addEventListener('scalechange', function scalechange(evt) {
var customScaleOption = document.getElementById('customScaleOption');
customScaleOption.selected = false;
if (!evt.resetAutoSettings &&
(document.getElementById('pageWidthOption').selected ||
document.getElementById('pageFitOption').selected ||
document.getElementById('pageAutoOption').selected)) {
updateViewarea();
return;
}
var predefinedValueFound = selectScaleOption('' + evt.scale);
if (!predefinedValueFound) {
customScaleOption.textContent = Math.round(evt.scale * 10000) / 100 + '%';
customScaleOption.selected = true;
}
updateViewarea();
}, true);
window.addEventListener('pagechange', function pagechange(evt) {
var page = evt.pageNumber;
if (document.getElementById('pageNumber').value != page) {
document.getElementById('pageNumber').value = page;

var selected = document.querySelector('.thumbnail.selected');


if (selected)
selected.classList.remove('selected');
var thumbnail = document.getElementById('thumbnailContainer' + page);
thumbnail.classList.add('selected');
var visibleThumbs = PDFView.getVisibleThumbs();
var numVisibleThumbs = visibleThumbs.views.length;
// If the thumbnail isn't currently visible scroll it into view.
if (numVisibleThumbs > 0) {
var first = visibleThumbs.first.id;
// Account for only one thumbnail being visible.
var last = numVisibleThumbs > 1 ?
visibleThumbs.last.id : first;
if (page <= first || page >= last)
scrollIntoView(thumbnail);
}
}
document.getElementById('previous').disabled = (page <= 1);
document.getElementById('next').disabled = (page >= PDFView.pages.length);
}, true);
// Firefox specific event, so that we can prevent browser from zooming
window.addEventListener('DOMMouseScroll', function(evt) {
if (evt.ctrlKey) {
evt.preventDefault();
var ticks = evt.detail;
var direction = (ticks > 0) ? 'zoomOut' : 'zoomIn';
for (var i = 0, length = Math.abs(ticks); i < length; i++)
PDFView[direction]();
} else if (PDFView.isFullscreen) {
var FIREFOX_DELTA_FACTOR = -40;
PDFView.mouseScroll(evt.detail * FIREFOX_DELTA_FACTOR);
}
}, false);
window.addEventListener('mousemove', function keydown(evt) {
if (PDFView.isFullscreen) {
PDFView.showPresentationControls();
}
}, false);
window.addEventListener('mousedown', function mousedown(evt) {
if (PDFView.isFullscreen && evt.button === 0) {
// Mouse click in fullmode advances a page
evt.preventDefault();
}

PDFView.page++;

}, false);
window.addEventListener('keydown', function keydown(evt) {
var handled = false;
var cmd = (evt.ctrlKey ? 1 : 0) |
(evt.altKey ? 2 : 0) |
(evt.shiftKey ? 4 : 0) |
(evt.metaKey ? 8 : 0);
// First, handle the key bindings that are independent whether an input

// control is selected or not.


if (cmd == 1 || cmd == 8) { // either CTRL or META key.
switch (evt.keyCode) {
case 70:
if (!PDFView.supportsIntegratedFind) {
PDFFindBar.toggle();
handled = true;
}
break;
case 61: // FF/Mac '='
case 107: // FF '+' and '='
case 187: // Chrome '+'
PDFView.zoomIn();
handled = true;
break;
case 173: // FF/Mac '-'
case 109: // FF '-'
case 189: // Chrome '-'
PDFView.zoomOut();
handled = true;
break;
case 48: // '0'
PDFView.parseScale(DEFAULT_SCALE, true);
handled = true;
break;
}
}
// CTRL or META with or without SHIFT.
if (cmd == 1 || cmd == 8 || cmd == 5 || cmd == 12) {
switch (evt.keyCode) {
case 71: // g
if (!PDFView.supportsIntegratedFind) {
PDFFindBar.dispatchEvent('again', cmd == 5 || cmd == 12);
handled = true;
}
break;
}
}
if (handled) {
evt.preventDefault();
return;
}
// Some shortcuts should not get handled if a control/input element
// is selected.
var curElement = document.activeElement;
if (curElement && (curElement.tagName == 'INPUT' ||
curElement.tagName == 'SELECT')) {
return;
}
var controlsElement = document.getElementById('toolbar');
while (curElement) {
if (curElement === controlsElement && !PDFView.isFullscreen)
return; // ignoring if the 'toolbar' element is focused
curElement = curElement.parentNode;
}
if (cmd == 0) { // no control key pressed at all.

switch
case
case
case
if

(evt.keyCode) {
38: // up arrow
33: // pg up
8: // backspace
(!PDFView.isFullscreen) {
break;

}
// in fullscreen mode falls throw here
case 37: // left arrow
case 75: // 'k'
case 80: // 'p'
PDFView.page--;
handled = true;
break;
case 40: // down arrow
case 34: // pg down
case 32: // spacebar
if (!PDFView.isFullscreen) {
break;
}
// in fullscreen mode falls throw here
case 39: // right arrow
case 74: // 'j'
case 78: // 'n'
PDFView.page++;
handled = true;
break;
case 36: // home
if (PDFView.isFullscreen) {
PDFView.page = 1;
handled = true;
}
break;
case 35: // end
if (PDFView.isFullscreen) {
PDFView.page = PDFView.pdfDocument.numPages;
handled = true;
}
break;

case 82: // 'r'


PDFView.rotatePages(90);
break;

if (cmd == 4) { // shift-key
switch (evt.keyCode) {
case 82: // 'r'
PDFView.rotatePages(-90);
break;
}
}
if (handled) {
evt.preventDefault();
PDFView.clearMouseScrollState();
}
});

window.addEventListener('beforeprint', function beforePrint(evt) {


PDFView.beforePrint();
});
window.addEventListener('afterprint', function afterPrint(evt) {
PDFView.afterPrint();
});
(function fullscreenClosure() {
function fullscreenChange(e) {
var isFullscreen = document.fullscreenElement || document.mozFullScreen ||
document.webkitIsFullScreen;

if (!isFullscreen) {
PDFView.exitFullscreen();
}

window.addEventListener('fullscreenchange', fullscreenChange, false);


window.addEventListener('mozfullscreenchange', fullscreenChange, false);
window.addEventListener('webkitfullscreenchange', fullscreenChange, false);
})();
S!W)Y3X>VI

RUQcOoM{K J  I !H "G$G%F&F'E(E)E)F(G&H$I"I IIIIIC"


nP
bL_Y
i\ef$bp*_z/\
\eYp V{%T )Q
3[-P
6Y0O
9X2N3M5M6L7L8L8M5O1Q.R+S)S'S'S'S'
;V>U?UATBTBUAW<Y7[3\0].].].].]
tL
n pXkb$hl+eu0b}5` 8^ <\ >[ AZCYDYEXFXF[@^;_7`3a1a1a1a1a

w    # 5 C O{Y#wb*tj1qq6 ny; l ? j B i E g H fJ eL eM eN gJ iC k> m: n7

   2 A M V"|_*xg0 uo6 sv: q}? o B m F l I jK jM iO iO jL mE o? p; q8 q8 q


 H
 .R = [( c/ ~j5 |q9 zx= x B v E u I|s LyrNvrPtrPtrOvuGxwBzx>{y:{y:{y:{y:{y:_

ly      , ;

G P Y' a. h4 o9 v= }~A}{ Eyz Ivx LswNpwPnwPmwOpyHr{Ct|>u};u};u};u};u};a


 o|      * 9 E N W& _- f3 m8 t={ {Aw Et Hp} Km|Nj|Oh|Pg|Pj~Im Cn ?o

xoI
F
s.
j~Q
Nm:gE
exY
V#r]*md/ik4d
``$\g)Xo,Tx0Q
bN]VY^Uf!Qn$Nw(K
s8` 3M
{<\ 6J
?Y+H
8H:F:E:F9G6G4H3H3H3H3H3
BU-EES/C1A1A1A0A/A.A-A-A-A-A-
GQ GP GQ DS @U <V :V :V :V :V:t
   

USQ[NcKkHuE B "@ $>&<&<&<%;%;%;%;%;%;%;%     yod

F_ChAq>|< : 8 7665444444    ymbXUQ M+I/* -*- Mode: Jav


/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* Copyright 2012 Mozilla Foundation
*
* 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
var DEFAULT_URL = 'compressed.tracemonkey-pldi-09.pdf';
var DEFAULT_SCALE = 'auto';
var DEFAULT_SCALE_DELTA = 1.1;
var UNKNOWN_SCALE = 0;
var CACHE_SIZE = 20;
var CSS_UNITS = 96.0 / 72.0;
var SCROLLBAR_PADDING = 40;
var VERTICAL_PADDING = 5;
var MIN_SCALE = 0.25;
var MAX_SCALE = 4.0;
var IMAGE_DIR = './images/';
var SETTINGS_MEMORY = 20;
var ANNOT_MIN_SIZE = 10;
var RenderingStates = {
INITIAL: 0,
RUNNING: 1,
PAUSED: 2,
FINISHED: 3
};
var FindStates = {
FIND_FOUND: 0,
FIND_NOTFOUND: 1,
FIND_WRAPPED: 2,
FIND_PENDING: 3
};
PDFJS.workerSrc = '../build/pdf.js';
var mozL10n = document.mozL10n || document.webL10n;
function getFileName(url) {
var anchor = url.indexOf('#');
var query = url.indexOf('?');
var end = Math.min(
anchor > 0 ? anchor : url.length,
query > 0 ? query : url.length);
return url.substring(url.lastIndexOf('/', end) + 1, end);
}
function scrollIntoView(element, spot) {
var parent = element.offsetParent, offsetY = element.offsetTop;

while (parent.clientHeight == parent.scrollHeight) {


offsetY += parent.offsetTop;
parent = parent.offsetParent;
if (!parent)
return; // no need to scroll
}
if (spot)
offsetY += spot.top;
parent.scrollTop = offsetY;

var Cache = function cacheCache(size) {


var data = [];
this.push = function cachePush(view) {
var i = data.indexOf(view);
if (i >= 0)
data.splice(i);
data.push(view);
if (data.length > size)
data.shift().destroy();
};
};
var ProgressBar = (function ProgressBarClosure() {
function clamp(v, min, max) {
return Math.min(Math.max(v, min), max);
}
function ProgressBar(id, opts) {
// Fetch the sub-elements for later
this.div = document.querySelector(id + ' .progress');
// Get options, with sensible defaults
this.height = opts.height || 100;
this.width = opts.width || 100;
this.units = opts.units || '%';

// Initialize heights
this.div.style.height = this.height + this.units;

ProgressBar.prototype = {
updateBar: function ProgressBar_updateBar() {
if (this._indeterminate) {
this.div.classList.add('indeterminate');
return;
}
var progressSize = this.width * this._percent / 100;
if (this._percent > 95)
this.div.classList.add('full');
else
this.div.classList.remove('full');
this.div.classList.remove('indeterminate');
this.div.style.width = progressSize + this.units;

},
get percent() {
return this._percent;
},
set percent(val) {
this._indeterminate = isNaN(val);
this._percent = clamp(val, 0, 100);
this.updateBar();
}

};

return ProgressBar;
})();
/* Copyright 2012 Mozilla Foundation
*
* 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var FirefoxCom = (function FirefoxComClosure() {
return {
/**
* Creates an event that the extension is listening for and will
* synchronously respond to.
* NOTE: It is reccomended to use request() instead since one day we may not
* be able to synchronously reply.
* @param {String} action The action to trigger.
* @param {String} data Optional data to send.
* @return {*} The response.
*/
requestSync: function(action, data) {
var request = document.createTextNode('');
request.setUserData('action', action, null);
request.setUserData('data', data, null);
request.setUserData('sync', true, null);
document.documentElement.appendChild(request);
var sender = document.createEvent('Events');
sender.initEvent('pdf.js.message', true, false);
request.dispatchEvent(sender);
var response = request.getUserData('response');
document.documentElement.removeChild(request);
return response;

},
/**
* Creates an event that the extension is listening for and will
* asynchronously respond by calling the callback.
* @param {String} action The action to trigger.

* @param {String} data Optional data to send.


* @param {Function} callback Optional response callback that will be called
* with one data argument.
*/
request: function(action, data, callback) {
var request = document.createTextNode('');
request.setUserData('action', action, null);
request.setUserData('data', data, null);
request.setUserData('sync', false, null);
if (callback) {
request.setUserData('callback', callback, null);
document.addEventListener('pdf.js.response', function listener(event) {
var node = event.target,
callback = node.getUserData('callback'),
response = node.getUserData('response');
document.documentElement.removeChild(node);
document.removeEventListener('pdf.js.response', listener, false);
return callback(response);
}, false);

}
document.documentElement.appendChild(request);

}
};
})();

var sender = document.createEvent('HTMLEvents');


sender.initEvent('pdf.js.message', true, false);
return request.dispatchEvent(sender);

// Settings Manager - This is a utility for saving settings


// First we see if localStorage is available
// If not, we use FUEL in FF
// Use asyncStorage for B2G
var Settings = (function SettingsClosure() {
var isLocalStorageEnabled = (function localStorageEnabledTest() {
// Feature test as per http://diveintohtml5.info/storage.html
// The additional localStorage call is to get around a FF quirk, see
// bug #495747 in bugzilla
try {
return 'localStorage' in window && window['localStorage'] !== null &&
localStorage;
} catch (e) {
return false;
}
})();
function Settings(fingerprint) {
this.fingerprint = fingerprint;
this.initializedPromise = new PDFJS.Promise();
var resolvePromise = (function settingsResolvePromise(db) {
this.initialize(db || '{}');
this.initializedPromise.resolve();
}).bind(this);

resolvePromise(FirefoxCom.requestSync('getDatabase', null));
}
Settings.prototype = {
initialize: function settingsInitialize(database) {
database = JSON.parse(database);
if (!('files' in database))
database.files = [];
if (database.files.length >= SETTINGS_MEMORY)
database.files.shift();
var index;
for (var i = 0, length = database.files.length; i < length; i++) {
var branch = database.files[i];
if (branch.fingerprint == this.fingerprint) {
index = i;
break;
}
}
if (typeof index != 'number')
index = database.files.push({fingerprint: this.fingerprint}) - 1;
this.file = database.files[index];
this.database = database;
},
set: function settingsSet(name, val) {
if (!this.initializedPromise.isResolved)
return;
var file = this.file;
file[name] = val;
var database = JSON.stringify(this.database);
FirefoxCom.requestSync('setDatabase', database);

},

get: function settingsGet(name, defaultValue) {


if (!this.initializedPromise.isResolved)
return defaultValue;
}

return this.file[name] || defaultValue;

};

return Settings;
})();
var cache = new Cache(CACHE_SIZE);
var currentPageNumber = 1;
var PDFFindController = {
startedTextExtraction: false,
extractTextPromises: [],
// If active, find results will be highlighted.
active: false,
// Stores the text for each page.
pageContents: [],

pageMatches: [],
// Currently selected match.
selected: {
pageIdx: -1,
matchIdx: -1
},
// Where find algorithm currently is in the document.
offset: {
pageIdx: null,
matchIdx: null
},
resumePageIdx: null,
resumeCallback: null,
state: null,
dirtyMatch: false,
findTimeout: null,
initialize: function() {
var events = [
'find',
'findagain',
'findhighlightallchange',
'findcasesensitivitychange'
];
this.handleEvent = this.handleEvent.bind(this);
for (var i = 0; i < events.length; i++) {
window.addEventListener(events[i], this.handleEvent);
}

},

calcFindMatch: function(pageIndex) {
var pageContent = this.pageContents[pageIndex];
var query = this.state.query;
var caseSensitive = this.state.caseSensitive;
var queryLen = query.length;
if (queryLen === 0) {
// Do nothing the matches should be wiped out already.
return;
}
if (!caseSensitive) {
pageContent = pageContent.toLowerCase();
query = query.toLowerCase();
}
var matches = [];
var matchIdx = -queryLen;
while (true) {
matchIdx = pageContent.indexOf(query, matchIdx + queryLen);

if (matchIdx === -1) {


break;
}
matches.push(matchIdx);
}
this.pageMatches[pageIndex] = matches;
this.updatePage(pageIndex);
if (this.resumePageIdx === pageIndex) {
var callback = this.resumeCallback;
this.resumePageIdx = null;
this.resumeCallback = null;
callback();
}

},

extractText: function() {
if (this.startedTextExtraction) {
return;
}
this.startedTextExtraction = true;
this.pageContents = [];
for (var i = 0, ii = PDFView.pdfDocument.numPages; i < ii; i++) {
this.extractTextPromises.push(new PDFJS.Promise());
}
var self = this;
function extractPageText(pageIndex) {
PDFView.pages[pageIndex].getTextContent().then(
function textContentResolved(data) {
// Build the find string.
var bidiTexts = data.bidiTexts;
var str = '';
for (var i = 0; i < bidiTexts.length; i++) {
str += bidiTexts[i].str;
}
// Store the pageContent as a string.
self.pageContents.push(str);

self.extractTextPromises[pageIndex].resolve(pageIndex);
if ((pageIndex + 1) < PDFView.pages.length)
extractPageText(pageIndex + 1);

);

}
extractPageText(0);
return this.extractTextPromise;

},

handleEvent: function(e) {
if (this.state === null || e.type !== 'findagain') {
this.dirtyMatch = true;
}
this.state = e.detail;
this.updateUIState(FindStates.FIND_PENDING);
this.extractText();

clearTimeout(this.findTimeout);
if (e.type === 'find') {
// Only trigger the find action after 250ms of silence.
this.findTimeout = setTimeout(this.nextMatch.bind(this), 250);
} else {
this.nextMatch();
}

},

updatePage: function(idx) {
var page = PDFView.pages[idx];
if (this.selected.pageIdx === idx) {
// If the page is selected, scroll the page into view, which triggers
// rendering the page, which adds the textLayer. Once the textLayer is
// build, it will scroll onto the selected match.
page.scrollIntoView();
}
if (page.textLayer) {
page.textLayer.updateMatches();
}

},

nextMatch: function() {
var pages = PDFView.pages;
var previous = this.state.findPrevious;
var numPages = PDFView.pages.length;
this.active = true;
if (this.dirtyMatch) {
// Need to recalculate the matches, reset everything.
this.dirtyMatch = false;
this.selected.pageIdx = this.selected.matchIdx = -1;
this.offset.pageIdx = previous ? numPages - 1 : 0;
this.offset.matchIdx = null;
this.hadMatch = false;
this.resumeCallback = null;
this.resumePageIdx = null;
this.pageMatches = [];
var self = this;
for (var i = 0; i < numPages; i++) {
// Wipe out any previous highlighted matches.
this.updatePage(i);

// As soon as the text is extracted start finding the matches.


this.extractTextPromises[i].onData(function(pageIdx) {
// Use a timeout since all the pages may already be extracted and we
// want to start highlighting before finding all the matches.
setTimeout(function() {
self.calcFindMatch(pageIdx);
});
});

// If there's no query there's no point in searching.

if (this.state.query === '') {


this.updateUIState(FindStates.FIND_FOUND);
return;
}
// If we're waiting on a page, we return since we can't do anything else.
if (this.resumeCallback) {
return;
}
var offset = this.offset;
// If there's already a matchIdx that means we are iterating through a
// page's matches.
if (offset.matchIdx !== null) {
var numPageMatches = this.pageMatches[offset.pageIdx].length;
if ((!previous && offset.matchIdx + 1 < numPageMatches) ||
(previous && offset.matchIdx > 0)) {
// The simple case, we just have advance the matchIdx to select the next
// match on the page.
this.hadMatch = true;
offset.matchIdx = previous ? offset.matchIdx - 1 : offset.matchIdx + 1;
this.updateMatch(true);
return;
}
// We went beyond the current page's matches, so we advance to the next
// page.
this.advanceOffsetPage(previous);
}
// Start searching through the page.
this.nextPageMatch();

},

nextPageMatch: function() {
if (this.resumePageIdx !== null)
console.error('There can only be one pending page.');
var matchesReady = function(matches) {
var offset = this.offset;
var numMatches = matches.length;
var previous = this.state.findPrevious;
if (numMatches) {
// There were matches for the page, so initialize the matchIdx.
this.hadMatch = true;
offset.matchIdx = previous ? numMatches - 1 : 0;
this.updateMatch(true);
} else {
// No matches attempt to search the next page.
this.advanceOffsetPage(previous);
if (offset.wrapped) {
offset.matchIdx = null;
if (!this.hadMatch) {
// No point in wrapping there were no matches.
this.updateMatch(false);
return;
}
}
// Search the next page.
this.nextPageMatch();
}
}.bind(this);

var pageIdx = this.offset.pageIdx;


var pageMatches = this.pageMatches;
if (!pageMatches[pageIdx]) {
// The matches aren't ready setup a callback so we can be notified,
// when they are ready.
this.resumeCallback = function() {
matchesReady(pageMatches[pageIdx]);
};
this.resumePageIdx = pageIdx;
return;
}
// The matches are finished already.
matchesReady(pageMatches[pageIdx]);

},

advanceOffsetPage: function(previous) {
var offset = this.offset;
var numPages = this.extractTextPromises.length;
offset.pageIdx = previous ? offset.pageIdx - 1 : offset.pageIdx + 1;
offset.matchIdx = null;
if (offset.pageIdx >= numPages || offset.pageIdx < 0) {
offset.pageIdx = previous ? numPages - 1 : 0;
offset.wrapped = true;
return;
}
},
updateMatch: function(found) {
var state = FindStates.FIND_NOTFOUND;
var wrapped = this.offset.wrapped;
this.offset.wrapped = false;
if (found) {
var previousPage = this.selected.pageIdx;
this.selected.pageIdx = this.offset.pageIdx;
this.selected.matchIdx = this.offset.matchIdx;
state = wrapped ? FindStates.FIND_WRAPPED : FindStates.FIND_FOUND;
// Update the currently selected page to wipe out any selected matches.
if (previousPage !== -1 && previousPage !== this.selected.pageIdx) {
this.updatePage(previousPage);
}
}
this.updateUIState(state, this.state.findPrevious);
if (this.selected.pageIdx !== -1) {
this.updatePage(this.selected.pageIdx, true);
}
},
updateUIState: function(state, previous) {
if (PDFView.supportsIntegratedFind) {
FirefoxCom.request('updateFindControlState',
{result: state, findPrevious: previous});
return;
}
PDFFindBar.updateUIState(state, previous);
}

};

var PDFFindBar = {
// TODO: Enable the FindBar *AFTER* the pagesPromise in the load function

// got resolved
opened: false,
initialize: function() {
this.bar = document.getElementById('findbar');
this.toggleButton = document.getElementById('viewFind');
this.findField = document.getElementById('findInput');
this.highlightAll = document.getElementById('findHighlightAll');
this.caseSensitive = document.getElementById('findMatchCase');
this.findMsg = document.getElementById('findMsg');
this.findStatusIcon = document.getElementById('findStatusIcon');
var self = this;
this.toggleButton.addEventListener('click', function() {
self.toggle();
});
this.findField.addEventListener('input', function() {
self.dispatchEvent('');
});
this.bar.addEventListener('keydown', function(evt) {
switch (evt.keyCode) {
case 13: // Enter
if (evt.target === self.findField) {
self.dispatchEvent('again', evt.shiftKey);
}
break;
case 27: // Escape
self.close();
break;
}
});
document.getElementById('findPrevious').addEventListener('click',
function() { self.dispatchEvent('again', true); }
);
document.getElementById('findNext').addEventListener('click', function() {
self.dispatchEvent('again', false);
});
this.highlightAll.addEventListener('click', function() {
self.dispatchEvent('highlightallchange');
});
this.caseSensitive.addEventListener('click', function() {
self.dispatchEvent('casesensitivitychange');
});

},

dispatchEvent: function(aType, aFindPrevious) {


var event = document.createEvent('CustomEvent');
event.initCustomEvent('find' + aType, true, true, {
query: this.findField.value,
caseSensitive: this.caseSensitive.checked,
highlightAll: this.highlightAll.checked,
findPrevious: aFindPrevious
});

return window.dispatchEvent(event);

},

updateUIState: function(state, previous) {


var notFound = false;
var findMsg = '';
var status = '';
switch (state) {
case FindStates.FIND_FOUND:
break;
case FindStates.FIND_PENDING:
status = 'pending';
break;
case FindStates.FIND_NOTFOUND:
findMsg = mozL10n.get('find_not_found', null, 'Phrase not found');
notFound = true;
break;

case FindStates.FIND_WRAPPED:
if (previous) {
findMsg = mozL10n.get('find_reached_top', null,
'Reached top of document, continued from bottom');
} else {
findMsg = mozL10n.get('find_reached_bottom', null,
'Reached end of document, continued from top');
}
break;

if (notFound) {
this.findField.classList.add('notFound');
} else {
this.findField.classList.remove('notFound');
}
this.findField.setAttribute('data-status', status);
this.findMsg.textContent = findMsg;

},

open: function() {
if (this.opened) return;
this.opened = true;
this.toggleButton.classList.add('toggled');
this.bar.classList.remove('hidden');
this.findField.select();
this.findField.focus();

},

close: function() {
if (!this.opened) return;
this.opened = false;
this.toggleButton.classList.remove('toggled');
this.bar.classList.add('hidden');
PDFFindController.active = false;

},
toggle: function() {
if (this.opened) {
this.close();
} else {
this.open();
}
}

};

var PDFView = {
pages: [],
thumbnails: [],
currentScale: UNKNOWN_SCALE,
currentScaleValue: null,
initialBookmark: document.location.hash.substring(1),
startedTextExtraction: false,
pageText: [],
container: null,
thumbnailContainer: null,
initialized: false,
fellback: false,
pdfDocument: null,
sidebarOpen: false,
pageViewScroll: null,
thumbnailViewScroll: null,
isFullscreen: false,
previousScale: null,
pageRotation: 0,
mouseScrollTimeStamp: 0,
mouseScrollDelta: 0,
lastScroll: 0,
// called once when the document is loaded
initialize: function pdfViewInitialize() {
var self = this;
var container = this.container = document.getElementById('viewerContainer');
this.pageViewScroll = {};
this.watchScroll(container, this.pageViewScroll, updateViewarea);
var thumbnailContainer = this.thumbnailContainer =
document.getElementById('thumbnailView');
this.thumbnailViewScroll = {};
this.watchScroll(thumbnailContainer, this.thumbnailViewScroll,
this.renderHighestPriority.bind(this));
PDFFindBar.initialize();
PDFFindController.initialize();
this.initialized = true;
container.addEventListener('scroll', function() {
self.lastScroll = Date.now();
}, false);

},

// Helper function to keep track whether a div was scrolled up or down and
// then call a callback.
watchScroll: function pdfViewWatchScroll(viewAreaElement, state, callback) {
state.down = true;

state.lastY = viewAreaElement.scrollTop;
viewAreaElement.addEventListener('scroll', function webViewerScroll(evt) {
var currentY = viewAreaElement.scrollTop;
var lastY = state.lastY;
if (currentY > lastY)
state.down = true;
else if (currentY < lastY)
state.down = false;
// else do nothing and use previous value
state.lastY = currentY;
callback();
}, true);

},

setScale: function pdfViewSetScale(val, resetAutoSettings, noScroll) {


if (val == this.currentScale)
return;
var pages = this.pages;
for (var i = 0; i < pages.length; i++)
pages[i].update(val * CSS_UNITS);
if (!noScroll && this.currentScale != val)
this.pages[this.page - 1].scrollIntoView();
this.currentScale = val;
var event = document.createEvent('UIEvents');
event.initUIEvent('scalechange', false, false, window, 0);
event.scale = val;
event.resetAutoSettings = resetAutoSettings;
window.dispatchEvent(event);

},

parseScale: function pdfViewParseScale(value, resetAutoSettings, noScroll) {


if ('custom' == value)
return;
var scale = parseFloat(value);
this.currentScaleValue = value;
if (scale) {
this.setScale(scale, true, noScroll);
return;
}
var container = this.container;
var currentPage = this.pages[this.page - 1];
if (!currentPage) {
return;
}
var pageWidthScale = (container.clientWidth - SCROLLBAR_PADDING) /
currentPage.width * currentPage.scale / CSS_UNITS;
var pageHeightScale = (container.clientHeight - VERTICAL_PADDING) /
currentPage.height * currentPage.scale / CSS_UNITS;
switch (value) {
case 'page-actual':
scale = 1;
break;
case 'page-width':
scale = pageWidthScale;

break;
case 'page-height':
scale = pageHeightScale;
break;
case 'page-fit':
scale = Math.min(pageWidthScale, pageHeightScale);
break;
case 'auto':
scale = Math.min(1.0, pageWidthScale);
break;

}
this.setScale(scale, resetAutoSettings, noScroll);
selectScaleOption(value);

},

zoomIn: function pdfViewZoomIn() {


var newScale = (this.currentScale * DEFAULT_SCALE_DELTA).toFixed(2);
newScale = Math.min(MAX_SCALE, newScale);
this.parseScale(newScale, true);
},
zoomOut: function pdfViewZoomOut() {
var newScale = (this.currentScale / DEFAULT_SCALE_DELTA).toFixed(2);
newScale = Math.max(MIN_SCALE, newScale);
this.parseScale(newScale, true);
},
set page(val) {
var pages = this.pages;
var input = document.getElementById('pageNumber');
var event = document.createEvent('UIEvents');
event.initUIEvent('pagechange', false, false, window, 0);
if (!(0 < val && val <= pages.length)) {
event.pageNumber = this.page;
window.dispatchEvent(event);
return;
}
pages[val - 1].updateStats();
currentPageNumber = val;
event.pageNumber = val;
window.dispatchEvent(event);
// checking if the this.page was called from the updateViewarea function:
// avoiding the creation of two "set page" method (internal and public)
if (updateViewarea.inProgress)
return;
// Avoid scrolling the first page during loading
if (this.loading && val == 1)
return;
pages[val - 1].scrollIntoView();

},

get page() {
return currentPageNumber;
},

get supportsPrinting() {
var canvas = document.createElement('canvas');
var value = 'mozPrintCallback' in canvas;
// shadow
Object.defineProperty(this, 'supportsPrinting', { value: value,
enumerable: true,
configurable: true,
writable: false });
return value;
},
get supportsFullscreen() {
var doc = document.documentElement;
var support = doc.requestFullscreen || doc.mozRequestFullScreen ||
doc.webkitRequestFullScreen;
// Disable fullscreen button if we're in an iframe
if (!!window.frameElement)
support = false;
Object.defineProperty(this, 'supportsFullScreen', { value: support,
enumerable: true,
configurable: true,
writable: false });
return support;

},

get supportsIntegratedFind() {
var support = false;
support = FirefoxCom.requestSync('supportsIntegratedFind');
Object.defineProperty(this, 'supportsIntegratedFind', { value: support,
enumerable: true,
configurable: true,
writable: false });
return support;
},
initPassiveLoading: function pdfViewInitPassiveLoading() {
if (!PDFView.loadingBar) {
PDFView.loadingBar = new ProgressBar('#loadingBar', {});
}
window.addEventListener('message', function window_message(e) {
var args = e.data;
if (typeof args !== 'object' || !('pdfjsLoadAction' in args))
return;
switch (args.pdfjsLoadAction) {
case 'progress':
PDFView.progress(args.loaded / args.total);
break;
case 'complete':
if (!args.data) {
PDFView.error(mozL10n.get('loading_error', null,
'An error occurred while loading the PDF.'), e);
break;
}
PDFView.open(args.data, 0);
break;

}
});
FirefoxCom.requestSync('initPassiveLoading', null);

},

setTitleUsingUrl: function pdfViewSetTitleUsingUrl(url) {


this.url = url;
try {
document.title = decodeURIComponent(getFileName(url)) || url;
} catch (e) {
// decodeURIComponent may throw URIError,
// fall back to using the unprocessed url in that case
document.title = url;
}
},
open: function pdfViewOpen(url, scale, password) {
var parameters = {password: password};
if (typeof url === 'string') { // URL
this.setTitleUsingUrl(url);
parameters.url = url;
} else if (url && 'byteLength' in url) { // ArrayBuffer
parameters.data = url;
}
if (!PDFView.loadingBar) {
PDFView.loadingBar = new ProgressBar('#loadingBar', {});
}
this.pdfDocument = null;
var self = this;
self.loading = true;
PDFJS.getDocument(parameters).then(
function getDocumentCallback(pdfDocument) {
self.load(pdfDocument, scale);
self.loading = false;
},
function getDocumentError(message, exception) {
if (exception && exception.name === 'PasswordException') {
if (exception.code === 'needpassword') {
var promptString = mozL10n.get('request_password', null,
'PDF is protected by a password:');
password = prompt(promptString);
if (password && password.length > 0) {
return PDFView.open(url, scale, password);
}
}
}
var loadingErrorMessage = mozL10n.get('loading_error', null,
'An error occurred while loading the PDF.');
if (exception && exception.name === 'InvalidPDFException') {
// change error message also for other builds
var loadingErrorMessage = mozL10n.get('invalid_file_error', null,
'Invalid or corrupted PDF file.');
}
var loadingIndicator = document.getElementById('loading');
loadingIndicator.textContent = mozL10n.get('loading_error_indicator',

null, 'Error');
var moreInfo = {
message: message
};
self.error(loadingErrorMessage, moreInfo);
self.loading = false;

},
function getDocumentProgress(progressData) {
self.progress(progressData.loaded / progressData.total);
}

);

},

download: function pdfViewDownload() {


function noData() {
FirefoxCom.request('download', { originalUrl: url });
}
var url = this.url.split('#')[0];
// Document isn't ready just try to download with the url.
if (!this.pdfDocument) {
noData();
return;
}
this.pdfDocument.getData().then(
function getDataSuccess(data) {
var blob = PDFJS.createBlob(data.buffer, 'application/pdf');
var blobUrl = window.URL.createObjectURL(blob);
FirefoxCom.request('download', { blobUrl: blobUrl, originalUrl: url },
function response(err) {
if (err) {
// This error won't really be helpful because it's likely the
// fallback won't work either (or is already open).
PDFView.error('PDF failed to download.');
}
window.URL.revokeObjectURL(blobUrl);
}
);

},
noData // Error occurred try downloading with just the url.

);

},

fallback: function pdfViewFallback() {


// Only trigger the fallback once so we don't spam the user with messages
// for one PDF.
if (this.fellback)
return;
this.fellback = true;
var url = this.url.split('#')[0];
FirefoxCom.request('fallback', url, function response(download) {
if (!download)
return;
PDFView.download();
});
},
navigateTo: function pdfViewNavigateTo(dest) {
if (typeof dest === 'string')
dest = this.destinations[dest];

if (!(dest instanceof Array))


return; // invalid destination
// dest array looks like that: <page-ref> </XYZ|FitXXX> <args..>
var destRef = dest[0];
var pageNumber = destRef instanceof Object ?
this.pagesRefMap[destRef.num + ' ' + destRef.gen + ' R'] : (destRef + 1);
if (pageNumber > this.pages.length)
pageNumber = this.pages.length;
if (pageNumber) {
this.page = pageNumber;
var currentPage = this.pages[pageNumber - 1];
currentPage.scrollIntoView(dest);
}

},

getDestinationHash: function pdfViewGetDestinationHash(dest) {


if (typeof dest === 'string')
return PDFView.getAnchorUrl('#' + escape(dest));
if (dest instanceof Array) {
var destRef = dest[0]; // see navigateTo method for dest format
var pageNumber = destRef instanceof Object ?
this.pagesRefMap[destRef.num + ' ' + destRef.gen + ' R'] :
(destRef + 1);
if (pageNumber) {
var pdfOpenParams = PDFView.getAnchorUrl('#page=' + pageNumber);
var destKind = dest[1];
if (typeof destKind === 'object' && 'name' in destKind &&
destKind.name == 'XYZ') {
var scale = (dest[4] || this.currentScale);
pdfOpenParams += '&zoom=' + (scale * 100);
if (dest[2] || dest[3]) {
pdfOpenParams += ',' + (dest[2] || 0) + ',' + (dest[3] || 0);
}
}
return pdfOpenParams;
}
}
return '';
},
/**
* For the firefox extension we prefix the full url on anchor links so they
* don't come up as resource:// urls and so open in new tab/window works.
* @param {String} anchor The anchor hash include the #.
*/
getAnchorUrl: function getAnchorUrl(anchor) {
return this.url.split('#')[0] + anchor;
},
/**
* Returns scale factor for the canvas. It makes sense for the HiDPI displays.
* @return {Object} The object with horizontal (sx) and vertical (sy)
scales. The scaled property is set to false if scaling is
not required, true otherwise.
*/
getOutputScale: function pdfViewGetOutputDPI() {
var pixelRatio = 'devicePixelRatio' in window ? window.devicePixelRatio : 1;
return {
sx: pixelRatio,
sy: pixelRatio,

scaled: pixelRatio != 1

};

},

/**
* Show the error box.
* @param {String} message A message that is human readable.
* @param {Object} moreInfo (optional) Further information about the error
*
that is more technical. Should have a 'message'
*
and optionally a 'stack' property.
*/
error: function pdfViewError(message, moreInfo) {
var moreInfoText = mozL10n.get('error_build', {build: PDFJS.build},
'PDF.JS Build: {{build}}') + '\n';
if (moreInfo) {
moreInfoText +=
mozL10n.get('error_message', {message: moreInfo.message},
'Message: {{message}}');
if (moreInfo.stack) {
moreInfoText += '\n' +
mozL10n.get('error_stack', {stack: moreInfo.stack},
'Stack: {{stack}}');
} else {
if (moreInfo.filename) {
moreInfoText += '\n' +
mozL10n.get('error_file', {file: moreInfo.filename},
'File: {{file}}');
}
if (moreInfo.lineNumber) {
moreInfoText += '\n' +
mozL10n.get('error_line', {line: moreInfo.lineNumber},
'Line: {{line}}');
}
}
}
var loadingBox = document.getElementById('loadingBox');
loadingBox.setAttribute('hidden', 'true');
console.error(message + '\n' + moreInfoText);
this.fallback();

},

progress: function pdfViewProgress(level) {


var percent = Math.round(level * 100);
PDFView.loadingBar.percent = percent;
},
load: function pdfViewLoad(pdfDocument, scale) {
function bindOnAfterDraw(pageView, thumbnailView) {
// when page is painted, using the image as thumbnail base
pageView.onAfterDraw = function pdfViewLoadOnAfterDraw() {
thumbnailView.setImage(pageView.canvas);
};
}
this.pdfDocument = pdfDocument;
var errorWrapper = document.getElementById('errorWrapper');
errorWrapper.setAttribute('hidden', 'true');

var loadingBox = document.getElementById('loadingBox');


loadingBox.setAttribute('hidden', 'true');
var loadingIndicator = document.getElementById('loading');
loadingIndicator.textContent = '';
var thumbsView = document.getElementById('thumbnailView');
thumbsView.parentNode.scrollTop = 0;
while (thumbsView.hasChildNodes())
thumbsView.removeChild(thumbsView.lastChild);
if ('_loadingInterval' in thumbsView)
clearInterval(thumbsView._loadingInterval);
var container = document.getElementById('viewer');
while (container.hasChildNodes())
container.removeChild(container.lastChild);
var pagesCount = pdfDocument.numPages;
var id = pdfDocument.fingerprint;
document.getElementById('numPages').textContent =
mozL10n.get('page_of', {pageCount: pagesCount}, 'of {{pageCount}}');
document.getElementById('pageNumber').max = pagesCount;
PDFView.documentFingerprint = id;
var store = PDFView.store = new Settings(id);
var storePromise = store.initializedPromise;
this.pageRotation = 0;
var pages = this.pages = [];
this.pageText = [];
this.startedTextExtraction = false;
var pagesRefMap = {};
var thumbnails = this.thumbnails = [];
var pagePromises = [];
for (var i = 1; i <= pagesCount; i++)
pagePromises.push(pdfDocument.getPage(i));
var self = this;
var pagesPromise = PDFJS.Promise.all(pagePromises);
pagesPromise.then(function(promisedPages) {
for (var i = 1; i <= pagesCount; i++) {
var page = promisedPages[i - 1];
var pageView = new PageView(container, page, i, scale,
page.stats, self.navigateTo.bind(self));
var thumbnailView = new ThumbnailView(thumbsView, page, i);
bindOnAfterDraw(pageView, thumbnailView);

pages.push(pageView);
thumbnails.push(thumbnailView);
var pageRef = page.ref;
pagesRefMap[pageRef.num + ' ' + pageRef.gen + ' R'] = i;

self.pagesRefMap = pagesRefMap;
});
var destinationsPromise = pdfDocument.getDestinations();
destinationsPromise.then(function(destinations) {

self.destinations = destinations;
});
// outline and initial view depends on destinations and pagesRefMap
var promises = [pagesPromise, destinationsPromise, storePromise];
PDFJS.Promise.all(promises).then(function() {
pdfDocument.getOutline().then(function(outline) {
self.outline = new DocumentOutlineView(outline);
});
var storedHash = null;
if (store.get('exists', false)) {
var page = store.get('page', '1');
var zoom = store.get('zoom', PDFView.currentScale);
var left = store.get('scrollLeft', '0');
var top = store.get('scrollTop', '0');
}

storedHash = 'page=' + page + '&zoom=' + zoom + ',' + left + ',' + top;

self.setInitialView(storedHash, scale);
});
pdfDocument.getMetadata().then(function(data) {
var info = data.info, metadata = data.metadata;
self.documentInfo = info;
self.metadata = metadata;
var pdfTitle;
if (metadata) {
if (metadata.has('dc:title'))
pdfTitle = metadata.get('dc:title');
}
if (!pdfTitle && info && info['Title'])
pdfTitle = info['Title'];
if (pdfTitle)
document.title = pdfTitle + ' - ' + document.title;
if (info.IsAcroFormPresent) {
// AcroForm/XFA was found
PDFView.fallback();
}
});

},

setInitialView: function pdfViewSetInitialView(storedHash, scale) {


// Reset the current scale, as otherwise the page's scale might not get
// updated if the zoom level stayed the same.
this.currentScale = 0;
this.currentScaleValue = null;
if (this.initialBookmark) {
this.setHash(this.initialBookmark);
this.initialBookmark = null;
}
else if (storedHash)
this.setHash(storedHash);
else if (scale) {
this.parseScale(scale, true);

this.page = 1;

if (PDFView.currentScale === UNKNOWN_SCALE) {


// Scale was not initialized: invalid bookmark or scale was not specified.
// Setting the default one.
this.parseScale(DEFAULT_SCALE, true);
}

},

renderHighestPriority: function pdfViewRenderHighestPriority() {


// Pages have a higher priority than thumbnails, so check them first.
var visiblePages = this.getVisiblePages();
var pageView = this.getHighestPriority(visiblePages, this.pages,
this.pageViewScroll.down);
if (pageView) {
this.renderView(pageView, 'page');
return;
}
// No pages needed rendering so check thumbnails.
if (this.sidebarOpen) {
var visibleThumbs = this.getVisibleThumbs();
var thumbView = this.getHighestPriority(visibleThumbs,
this.thumbnails,
this.thumbnailViewScroll.down);
if (thumbView)
this.renderView(thumbView, 'thumbnail');
}
},
getHighestPriority: function pdfViewGetHighestPriority(visible, views,
scrolledDown) {
// The state has changed figure out which page has the highest priority to
// render next (if any).
// Priority:
// 1 visible pages
// 2 if last scrolled down page after the visible pages
// 2 if last scrolled up page before the visible pages
var visibleViews = visible.views;
var numVisible = visibleViews.length;
if (numVisible === 0) {
return false;
}
for (var i = 0; i < numVisible; ++i) {
var view = visibleViews[i].view;
if (!this.isViewFinished(view))
return view;
}
// All the visible views have rendered, try to render next/previous pages.
if (scrolledDown) {
var nextPageIndex = visible.last.id;
// ID's start at 1 so no need to add 1.
if (views[nextPageIndex] && !this.isViewFinished(views[nextPageIndex]))
return views[nextPageIndex];
} else {
var previousPageIndex = visible.first.id - 2;
if (views[previousPageIndex] &&
!this.isViewFinished(views[previousPageIndex]))

return views[previousPageIndex];
}
// Everything that needs to be rendered has been.
return false;

},

isViewFinished: function pdfViewNeedsRendering(view) {


return view.renderingState === RenderingStates.FINISHED;
},
// Render a page or thumbnail view. This calls the appropriate function based
// on the views state. If the view is already rendered it will return false.
renderView: function pdfViewRender(view, type) {
var state = view.renderingState;
switch (state) {
case RenderingStates.FINISHED:
return false;
case RenderingStates.PAUSED:
PDFView.highestPriorityPage = type + view.id;
view.resume();
break;
case RenderingStates.RUNNING:
PDFView.highestPriorityPage = type + view.id;
break;
case RenderingStates.INITIAL:
PDFView.highestPriorityPage = type + view.id;
view.draw(this.renderHighestPriority.bind(this));
break;
}
return true;
},
setHash: function pdfViewSetHash(hash) {
if (!hash)
return;
if (hash.indexOf('=') >= 0) {
var params = PDFView.parseQueryString(hash);
// borrowing syntax from "Parameters for Opening PDF Files"
if ('nameddest' in params) {
PDFView.navigateTo(params.nameddest);
return;
}
if ('page' in params) {
var pageNumber = (params.page | 0) || 1;
if ('zoom' in params) {
var zoomArgs = params.zoom.split(','); // scale,left,top
// building destination array
// If the zoom value, it has to get divided by 100. If it is a string,
// it should stay as it is.
var zoomArg = zoomArgs[0];
var zoomArgNumber = parseFloat(zoomArg);
if (zoomArgNumber)
zoomArg = zoomArgNumber / 100;
var dest = [null, {name: 'XYZ'}, (zoomArgs[1] | 0),
(zoomArgs[2] | 0), zoomArg];
var currentPage = this.pages[pageNumber - 1];
currentPage.scrollIntoView(dest);

} else {
this.page = pageNumber; // simple page
}

}
} else if (/^\d+$/.test(hash)) // page number
this.page = hash;
else // named destination
PDFView.navigateTo(unescape(hash));

},

switchSidebarView: function pdfViewSwitchSidebarView(view) {


var thumbsView = document.getElementById('thumbnailView');
var outlineView = document.getElementById('outlineView');
var thumbsButton = document.getElementById('viewThumbnail');
var outlineButton = document.getElementById('viewOutline');
switch (view) {
case 'thumbs':
thumbsButton.classList.add('toggled');
outlineButton.classList.remove('toggled');
thumbsView.classList.remove('hidden');
outlineView.classList.add('hidden');
PDFView.renderHighestPriority();
break;
case 'outline':
thumbsButton.classList.remove('toggled');
outlineButton.classList.add('toggled');
thumbsView.classList.add('hidden');
outlineView.classList.remove('hidden');

if (outlineButton.getAttribute('disabled'))
return;
break;

},

getVisiblePages: function pdfViewGetVisiblePages() {


return this.getVisibleElements(this.container,
this.pages, true);
},
getVisibleThumbs: function pdfViewGetVisibleThumbs() {
return this.getVisibleElements(this.thumbnailContainer,
this.thumbnails);
},
// Generic helper to find out what elements are visible within a scroll pane.
getVisibleElements: function pdfViewGetVisibleElements(
scrollEl, views, sortByVisibility) {
var currentHeight = 0, view;
var top = scrollEl.scrollTop;
for (var i = 1, ii = views.length; i <= ii; ++i) {
view = views[i - 1];
currentHeight = view.el.offsetTop;
if (currentHeight + view.el.clientHeight > top)
break;

currentHeight += view.el.clientHeight;

var visible = [];


// Algorithm broken in fullscreen mode
if (this.isFullscreen) {
var currentPage = this.pages[this.page - 1];
visible.push({
id: currentPage.id,
view: currentPage
});
}

return { first: currentPage, last: currentPage, views: visible};

var bottom = top + scrollEl.clientHeight;


var nextHeight, hidden, percent, viewHeight;
for (; i <= ii && currentHeight < bottom; ++i) {
view = views[i - 1];
viewHeight = view.el.clientHeight;
currentHeight = view.el.offsetTop;
nextHeight = currentHeight + viewHeight;
hidden = Math.max(0, top - currentHeight) +
Math.max(0, nextHeight - bottom);
percent = Math.floor((viewHeight - hidden) * 100.0 / viewHeight);
visible.push({ id: view.id, y: currentHeight,
view: view, percent: percent });
currentHeight = nextHeight;
}
var first = visible[0];
var last = visible[visible.length - 1];
if (sortByVisibility) {
visible.sort(function(a, b) {
var pc = a.percent - b.percent;
if (Math.abs(pc) > 0.001)
return -pc;

return a.id - b.id; // ensure stability


});

return {first: first, last: last, views: visible};

},

// Helper function to parse query string (e.g. ?param1=value&parm2=...).


parseQueryString: function pdfViewParseQueryString(query) {
var parts = query.split('&');
var params = {};
for (var i = 0, ii = parts.length; i < parts.length; ++i) {
var param = parts[i].split('=');
var key = param[0];
var value = param.length > 1 ? param[1] : null;
params[unescape(key)] = unescape(value);
}
return params;
},

beforePrint: function pdfViewSetupBeforePrint() {


if (!this.supportsPrinting) {
var printMessage = mozL10n.get('printing_not_supported', null,
'Warning: Printing is not fully supported by this browser.');
this.error(printMessage);
return;
}
var body = document.querySelector('body');
body.setAttribute('data-mozPrintCallback', true);
for (var i = 0, ii = this.pages.length; i < ii; ++i) {
this.pages[i].beforePrint();
}
},
afterPrint: function pdfViewSetupAfterPrint() {
var div = document.getElementById('printContainer');
while (div.hasChildNodes())
div.removeChild(div.lastChild);
},
fullscreen: function pdfViewFullscreen() {
var isFullscreen = document.fullscreenElement || document.mozFullScreen ||
document.webkitIsFullScreen;
if (isFullscreen) {
return false;
}
var wrapper = document.getElementById('viewerContainer');
if (document.documentElement.requestFullscreen) {
wrapper.requestFullscreen();
} else if (document.documentElement.mozRequestFullScreen) {
wrapper.mozRequestFullScreen();
} else if (document.documentElement.webkitRequestFullScreen) {
wrapper.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
} else {
return false;
}
this.isFullscreen = true;
var currentPage = this.pages[this.page - 1];
this.previousScale = this.currentScaleValue;
this.parseScale('page-fit', true);
// Wait for fullscreen to take effect
setTimeout(function() {
currentPage.scrollIntoView();
}, 0);
this.showPresentationControls();
return true;

},

exitFullscreen: function pdfViewExitFullscreen() {


this.isFullscreen = false;
this.parseScale(this.previousScale);
this.page = this.page;
this.clearMouseScrollState();
this.hidePresentationControls();
},

showPresentationControls: function pdfViewShowPresentationControls() {


var DELAY_BEFORE_HIDING_CONTROLS = 3000;
var wrapper = document.getElementById('viewerContainer');
if (this.presentationControlsTimeout) {
clearTimeout(this.presentationControlsTimeout);
} else {
wrapper.classList.add('presentationControls');
}
this.presentationControlsTimeout = setTimeout(function hideControls() {
wrapper.classList.remove('presentationControls');
delete PDFView.presentationControlsTimeout;
}, DELAY_BEFORE_HIDING_CONTROLS);
},
hidePresentationControls: function pdfViewShowPresentationControls() {
if (!this.presentationControlsTimeout) {
return;
}
clearTimeout(this.presentationControlsTimeout);
delete this.presentationControlsTimeout;
var wrapper = document.getElementById('viewerContainer');
wrapper.classList.remove('presentationControls');

},

rotatePages: function pdfViewPageRotation(delta) {


this.pageRotation = (this.pageRotation + 360 + delta) % 360;
for (var i = 0, l = this.pages.length; i < l; i++) {
var page = this.pages[i];
page.update(page.scale, this.pageRotation);
}
for (var i = 0, l = this.thumbnails.length; i < l; i++) {
var thumb = this.thumbnails[i];
thumb.updateRotation(this.pageRotation);
}
var currentPage = this.pages[this.page - 1];
this.parseScale(this.currentScaleValue, true);
this.renderHighestPriority();
// Wait for fullscreen to take effect
setTimeout(function() {
currentPage.scrollIntoView();
}, 0);

},

/**
* This function flips the page in presentation mode if the user scrolls up
* or down with large enough motion and prevents page flipping too often.
*
* @this {PDFView}
* @param {number} mouseScrollDelta The delta value from the mouse event.
*/
mouseScroll: function pdfViewMouseScroll(mouseScrollDelta) {

var MOUSE_SCROLL_COOLDOWN_TIME = 50;


var currentTime = (new Date()).getTime();
var storedTime = this.mouseScrollTimeStamp;
// In case one page has already been flipped there is a cooldown time
// which has to expire before next page can be scrolled on to.
if (currentTime > storedTime &&
currentTime - storedTime < MOUSE_SCROLL_COOLDOWN_TIME)
return;
// In case the user decides to scroll to the opposite direction than before
// clear the accumulated delta.
if ((this.mouseScrollDelta > 0 && mouseScrollDelta < 0) ||
(this.mouseScrollDelta < 0 && mouseScrollDelta > 0))
this.clearMouseScrollState();
this.mouseScrollDelta += mouseScrollDelta;
var PAGE_FLIP_THRESHOLD = 120;
if (Math.abs(this.mouseScrollDelta) >= PAGE_FLIP_THRESHOLD) {
var PageFlipDirection = {
UP: -1,
DOWN: 1
};
// In fullscreen mode scroll one page at a time.
var pageFlipDirection = (this.mouseScrollDelta > 0) ?
PageFlipDirection.UP :
PageFlipDirection.DOWN;
this.clearMouseScrollState();
var currentPage = this.page;
// In case we are already on the first or the last page there is no need
// to do anything.
if ((currentPage == 1 && pageFlipDirection == PageFlipDirection.UP) ||
(currentPage == this.pages.length &&
pageFlipDirection == PageFlipDirection.DOWN))
return;

this.page += pageFlipDirection;
this.mouseScrollTimeStamp = currentTime;

},

/**
* This function clears the member attributes used with mouse scrolling in
* presentation mode.
*
* @this {PDFView}
*/
clearMouseScrollState: function pdfViewClearMouseScrollState() {
this.mouseScrollTimeStamp = 0;
this.mouseScrollDelta = 0;
}

};

var PageView = function pageView(container, pdfPage, id, scale,


stats, navigateTo) {

this.id = id;
this.pdfPage = pdfPage;
this.rotation = 0;
this.scale = scale || 1.0;
this.viewport = this.pdfPage.getViewport(this.scale, this.pdfPage.rotate);
this.renderingState = RenderingStates.INITIAL;
this.resume = null;
this.textContent = null;
this.textLayer = null;
var anchor = document.createElement('a');
anchor.name = '' + this.id;
var div = this.el = document.createElement('div');
div.id = 'pageContainer' + this.id;
div.className = 'page';
div.style.width = Math.floor(this.viewport.width) + 'px';
div.style.height = Math.floor(this.viewport.height) + 'px';
container.appendChild(anchor);
container.appendChild(div);
this.destroy = function pageViewDestroy() {
this.update();
this.pdfPage.destroy();
};
this.update = function pageViewUpdate(scale, rotation) {
this.renderingState = RenderingStates.INITIAL;
this.resume = null;
if (typeof rotation !== 'undefined') {
this.rotation = rotation;
}
this.scale = scale || this.scale;
var totalRotation = (this.rotation + this.pdfPage.rotate) % 360;
var viewport = this.pdfPage.getViewport(this.scale, totalRotation);
this.viewport = viewport;
div.style.width = Math.floor(viewport.width) + 'px';
div.style.height = Math.floor(viewport.height) + 'px';
while (div.hasChildNodes())
div.removeChild(div.lastChild);
div.removeAttribute('data-loaded');
delete this.canvas;
this.loadingIconDiv = document.createElement('div');
this.loadingIconDiv.className = 'loadingIcon';
div.appendChild(this.loadingIconDiv);

};

Object.defineProperty(this, 'width', {
get: function PageView_getWidth() {

return this.viewport.width;
},
enumerable: true
});
Object.defineProperty(this, 'height', {
get: function PageView_getHeight() {
return this.viewport.height;
},
enumerable: true
});
function setupAnnotations(pdfPage, viewport) {
function bindLink(link, dest) {
link.href = PDFView.getDestinationHash(dest);
link.onclick = function pageViewSetupLinksOnclick() {
if (dest)
PDFView.navigateTo(dest);
return false;
};
}
function createElementWithStyle(tagName, item, rect) {
if (!rect) {
rect = viewport.convertToViewportRectangle(item.rect);
rect = PDFJS.Util.normalizeRect(rect);
}
var element = document.createElement(tagName);
element.style.left = Math.floor(rect[0]) + 'px';
element.style.top = Math.floor(rect[1]) + 'px';
element.style.width = Math.ceil(rect[2] - rect[0]) + 'px';
element.style.height = Math.ceil(rect[3] - rect[1]) + 'px';
return element;
}
function createTextAnnotation(item) {
var container = document.createElement('section');
container.className = 'annotText';
var rect = viewport.convertToViewportRectangle(item.rect);
rect = PDFJS.Util.normalizeRect(rect);
// sanity check because of OOo-generated PDFs
if ((rect[3] - rect[1]) < ANNOT_MIN_SIZE) {
rect[3] = rect[1] + ANNOT_MIN_SIZE;
}
if ((rect[2] - rect[0]) < ANNOT_MIN_SIZE) {
rect[2] = rect[0] + (rect[3] - rect[1]); // make it square
}
var image = createElementWithStyle('img', item, rect);
var iconName = item.name;
image.src = IMAGE_DIR + 'annotation-' +
iconName.toLowerCase() + '.svg';
image.alt = mozL10n.get('text_annotation_type', {type: iconName},
'[{{type}} Annotation]');
var content = document.createElement('div');
content.setAttribute('hidden', true);
var title = document.createElement('h1');
var text = document.createElement('p');
content.style.left = Math.floor(rect[2]) + 'px';
content.style.top = Math.floor(rect[1]) + 'px';
title.textContent = item.title;

if (!item.content && !item.title) {


content.setAttribute('hidden', true);
} else {
var e = document.createElement('span');
var lines = item.content.split(/(?:\r\n?|\n)/);
for (var i = 0, ii = lines.length; i < ii; ++i) {
var line = lines[i];
e.appendChild(document.createTextNode(line));
if (i < (ii - 1))
e.appendChild(document.createElement('br'));
}
text.appendChild(e);
image.addEventListener('mouseover', function annotationImageOver() {
content.removeAttribute('hidden');
}, false);

image.addEventListener('mouseout', function annotationImageOut() {


content.setAttribute('hidden', true);
}, false);

content.appendChild(title);
content.appendChild(text);
container.appendChild(image);
container.appendChild(content);
}

return container;

pdfPage.getAnnotations().then(function(items) {
for (var i = 0; i < items.length; i++) {
var item = items[i];
switch (item.type) {
case 'Link':
var link = createElementWithStyle('a', item);
link.href = item.url || '';
if (!item.url)
bindLink(link, ('dest' in item) ? item.dest : null);
div.appendChild(link);
break;
case 'Text':
var textAnnotation = createTextAnnotation(item);
if (textAnnotation)
div.appendChild(textAnnotation);
break;
}
}
});

this.getPagePoint = function pageViewGetPagePoint(x, y) {


return this.viewport.convertToPdfPoint(x, y);
};
this.scrollIntoView = function pageViewScrollIntoView(dest) {
if (!dest) {
scrollIntoView(div);
return;
}

var x = 0, y = 0;
var width = 0, height = 0, widthScale, heightScale;
var scale = 0;
switch (dest[1].name) {
case 'XYZ':
x = dest[2];
y = dest[3];
scale = dest[4];
break;
case 'Fit':
case 'FitB':
scale = 'page-fit';
break;
case 'FitH':
case 'FitBH':
y = dest[2];
scale = 'page-width';
break;
case 'FitV':
case 'FitBV':
x = dest[2];
scale = 'page-height';
break;
case 'FitR':
x = dest[2];
y = dest[3];
width = dest[4] - x;
height = dest[5] - y;
widthScale = (this.container.clientWidth - SCROLLBAR_PADDING) /
width / CSS_UNITS;
heightScale = (this.container.clientHeight - SCROLLBAR_PADDING) /
height / CSS_UNITS;
scale = Math.min(widthScale, heightScale);
break;
default:
return;
}
if (scale && scale !== PDFView.currentScale)
PDFView.parseScale(scale, true, true);
else if (PDFView.currentScale === UNKNOWN_SCALE)
PDFView.parseScale(DEFAULT_SCALE, true, true);
var boundingRect = [
this.viewport.convertToViewportPoint(x, y),
this.viewport.convertToViewportPoint(x + width, y + height)
];
setTimeout(function pageViewScrollIntoViewRelayout() {
// letting page to re-layout before scrolling
var scale = PDFView.currentScale;
var x = Math.min(boundingRect[0][0], boundingRect[1][0]);
var y = Math.min(boundingRect[0][1], boundingRect[1][1]);
var width = Math.abs(boundingRect[0][0] - boundingRect[1][0]);
var height = Math.abs(boundingRect[0][1] - boundingRect[1][1]);

};

scrollIntoView(div, {left: x, top: y, width: width, height: height});


}, 0);

this.getTextContent = function pageviewGetTextContent() {

if (!this.textContent) {
this.textContent = this.pdfPage.getTextContent();
}
return this.textContent;

};

this.draw = function pageviewDraw(callback) {


if (this.renderingState !== RenderingStates.INITIAL)
error('Must be in new state before drawing');
this.renderingState = RenderingStates.RUNNING;
var canvas = document.createElement('canvas');
canvas.id = 'page' + this.id;
canvas.mozOpaque = true;
div.appendChild(canvas);
this.canvas = canvas;
var textLayerDiv = null;
if (!PDFJS.disableTextLayer) {
textLayerDiv = document.createElement('div');
textLayerDiv.className = 'textLayer';
div.appendChild(textLayerDiv);
}
var textLayer = this.textLayer =
textLayerDiv ? new TextLayerBuilder(textLayerDiv, this.id - 1) : null;
var scale = this.scale, viewport = this.viewport;
var outputScale = PDFView.getOutputScale();
canvas.width = Math.floor(viewport.width) * outputScale.sx;
canvas.height = Math.floor(viewport.height) * outputScale.sy;
if (outputScale.scaled) {
var cssScale = 'scale(' + (1 / outputScale.sx) + ', ' +
(1 / outputScale.sy) + ')';
CustomStyle.setProp('transform' , canvas, cssScale);
CustomStyle.setProp('transformOrigin' , canvas, '0% 0%');
if (textLayerDiv) {
CustomStyle.setProp('transform' , textLayerDiv, cssScale);
CustomStyle.setProp('transformOrigin' , textLayerDiv, '0% 0%');
}
}
var ctx = canvas.getContext('2d');
ctx.save();
ctx.fillStyle = 'rgb(255, 255, 255)';
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.restore();
if (outputScale.scaled) {
ctx.scale(outputScale.sx, outputScale.sy);
}
// Rendering area
var self = this;
function pageViewDrawCallback(error) {
self.renderingState = RenderingStates.FINISHED;
if (self.loadingIconDiv) {
div.removeChild(self.loadingIconDiv);

delete self.loadingIconDiv;

if (error) {
PDFView.error(mozL10n.get('rendering_error', null,
'An error occurred while rendering the page.'), error);
}
self.stats = pdfPage.stats;
self.updateStats();
if (self.onAfterDraw)
self.onAfterDraw();

cache.push(self);
callback();

var renderContext = {
canvasContext: ctx,
viewport: this.viewport,
textLayer: textLayer,
continueCallback: function pdfViewcContinueCallback(cont) {
if (PDFView.highestPriorityPage !== 'page' + self.id) {
self.renderingState = RenderingStates.PAUSED;
self.resume = function resumeCallback() {
self.renderingState = RenderingStates.RUNNING;
cont();
};
return;
}
cont();
}
};
this.pdfPage.render(renderContext).then(
function pdfPageRenderCallback() {
pageViewDrawCallback(null);
},
function pdfPageRenderError(error) {
pageViewDrawCallback(error);
}
);
if (textLayer) {
this.getTextContent().then(
function textContentResolved(textContent) {
textLayer.setTextContent(textContent);
}
);
}
setupAnnotations(this.pdfPage, this.viewport);
div.setAttribute('data-loaded', true);

};

this.beforePrint = function pageViewBeforePrint() {


var pdfPage = this.pdfPage;
var viewport = pdfPage.getViewport(1);
// Use the same hack we use for high dpi displays for printing to get better
// output until bug 811002 is fixed in FF.
var PRINT_OUTPUT_SCALE = 2;

var canvas = this.canvas = document.createElement('canvas');


canvas.width = Math.floor(viewport.width) * PRINT_OUTPUT_SCALE;
canvas.height = Math.floor(viewport.height) * PRINT_OUTPUT_SCALE;
canvas.style.width = (PRINT_OUTPUT_SCALE * viewport.width) + 'pt';
canvas.style.height = (PRINT_OUTPUT_SCALE * viewport.height) + 'pt';
var cssScale = 'scale(' + (1 / PRINT_OUTPUT_SCALE) + ', ' +
(1 / PRINT_OUTPUT_SCALE) + ')';
CustomStyle.setProp('transform' , canvas, cssScale);
CustomStyle.setProp('transformOrigin' , canvas, '0% 0%');
var printContainer = document.getElementById('printContainer');
printContainer.appendChild(canvas);
var self = this;
canvas.mozPrintCallback = function(obj) {
var ctx = obj.context;
ctx.save();
ctx.fillStyle = 'rgb(255, 255, 255)';
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.restore();
ctx.scale(PRINT_OUTPUT_SCALE, PRINT_OUTPUT_SCALE);
var renderContext = {
canvasContext: ctx,
viewport: viewport
};
pdfPage.render(renderContext).then(function() {
// Tell the printEngine that rendering this canvas/page has finished.
obj.done();
self.pdfPage.destroy();
}, function(error) {
console.error(error);
// Tell the printEngine that rendering this canvas/page has failed.
// This will make the print proces stop.
if ('abort' in object)
obj.abort();
else
obj.done();
self.pdfPage.destroy();
});

};

};

this.updateStats = function pageViewUpdateStats() {


if (PDFJS.pdfBug && Stats.enabled) {
var stats = this.stats;
Stats.add(this.id, stats);
}
};

};

var ThumbnailView = function thumbnailView(container, pdfPage, id) {


var anchor = document.createElement('a');
anchor.href = PDFView.getAnchorUrl('#page=' + id);
anchor.title = mozL10n.get('thumb_page_title', {page: id}, 'Page {{page}}');
anchor.onclick = function stopNavigation() {
PDFView.page = id;
return false;

};
var rotation = 0;
var totalRotation = (rotation + pdfPage.rotate) % 360;
var viewport = pdfPage.getViewport(1, totalRotation);
var pageWidth = this.width = viewport.width;
var pageHeight = this.height = viewport.height;
var pageRatio = pageWidth / pageHeight;
this.id = id;
var
var
var
var

canvasWidth = 98;
canvasHeight = canvasWidth / this.width * this.height;
scaleX = this.scaleX = (canvasWidth / pageWidth);
scaleY = this.scaleY = (canvasHeight / pageHeight);

var div = this.el = document.createElement('div');


div.id = 'thumbnailContainer' + id;
div.className = 'thumbnail';
var ring = document.createElement('div');
ring.className = 'thumbnailSelectionRing';
ring.style.width = canvasWidth + 'px';
ring.style.height = canvasHeight + 'px';
div.appendChild(ring);
anchor.appendChild(div);
container.appendChild(anchor);
this.hasImage = false;
this.renderingState = RenderingStates.INITIAL;
this.updateRotation = function(rot) {
rotation = rot;
totalRotation = (rotation + pdfPage.rotate) % 360;
viewport = pdfPage.getViewport(1, totalRotation);
pageWidth = this.width = viewport.width;
pageHeight = this.height = viewport.height;
pageRatio = pageWidth / pageHeight;
canvasHeight = canvasWidth / this.width * this.height;
scaleX = this.scaleX = (canvasWidth / pageWidth);
scaleY = this.scaleY = (canvasHeight / pageHeight);
div.removeAttribute('data-loaded');
ring.textContent = '';
ring.style.width = canvasWidth + 'px';
ring.style.height = canvasHeight + 'px';

this.hasImage = false;
this.renderingState = RenderingStates.INITIAL;
this.resume = null;

function getPageDrawContext() {
var canvas = document.createElement('canvas');
canvas.id = 'thumbnail' + id;
canvas.mozOpaque = true;
canvas.width = canvasWidth;

canvas.height = canvasHeight;
canvas.className = 'thumbnailImage';
canvas.setAttribute('aria-label', mozL10n.get('thumb_page_canvas',
{page: id}, 'Thumbnail of Page {{page}}'));
div.setAttribute('data-loaded', true);
ring.appendChild(canvas);

var ctx = canvas.getContext('2d');


ctx.save();
ctx.fillStyle = 'rgb(255, 255, 255)';
ctx.fillRect(0, 0, canvasWidth, canvasHeight);
ctx.restore();
return ctx;

this.drawingRequired = function thumbnailViewDrawingRequired() {


return !this.hasImage;
};
this.draw = function thumbnailViewDraw(callback) {
if (this.renderingState !== RenderingStates.INITIAL)
error('Must be in new state before drawing');
this.renderingState = RenderingStates.RUNNING;
if (this.hasImage) {
callback();
return;
}
var self = this;
var ctx = getPageDrawContext();
var drawViewport = pdfPage.getViewport(scaleX, totalRotation);
var renderContext = {
canvasContext: ctx,
viewport: drawViewport,
continueCallback: function(cont) {
if (PDFView.highestPriorityPage !== 'thumbnail' + self.id) {
self.renderingState = RenderingStates.PAUSED;
self.resume = function() {
self.renderingState = RenderingStates.RUNNING;
cont();
};
return;
}
cont();
}
};
pdfPage.render(renderContext).then(
function pdfPageRenderCallback() {
self.renderingState = RenderingStates.FINISHED;
callback();
},
function pdfPageRenderError(error) {
self.renderingState = RenderingStates.FINISHED;
callback();
}
);
this.hasImage = true;

};
this.setImage = function thumbnailViewSetImage(img) {
if (this.hasImage || !img)
return;
this.renderingState = RenderingStates.FINISHED;
var ctx = getPageDrawContext();
ctx.drawImage(img, 0, 0, img.width, img.height,
0, 0, ctx.canvas.width, ctx.canvas.height);
this.hasImage = true;

};

};

var DocumentOutlineView = function documentOutlineView(outline) {


var outlineView = document.getElementById('outlineView');
while (outlineView.firstChild)
outlineView.removeChild(outlineView.firstChild);
function bindItemLink(domObj, item) {
domObj.href = PDFView.getDestinationHash(item.dest);
domObj.onclick = function documentOutlineViewOnclick(e) {
PDFView.navigateTo(item.dest);
return false;
};
}
if (!outline) {
var noOutline = document.createElement('div');
noOutline.classList.add('noOutline');
noOutline.textContent = mozL10n.get('no_outline', null,
'No Outline Available');
outlineView.appendChild(noOutline);
return;
}
var queue = [{parent: outlineView, items: outline}];
while (queue.length > 0) {
var levelData = queue.shift();
var i, n = levelData.items.length;
for (i = 0; i < n; i++) {
var item = levelData.items[i];
var div = document.createElement('div');
div.className = 'outlineItem';
var a = document.createElement('a');
bindItemLink(a, item);
a.textContent = item.title;
div.appendChild(a);
if (item.items.length > 0) {
var itemsDiv = document.createElement('div');
itemsDiv.className = 'outlineItems';
div.appendChild(itemsDiv);
queue.push({parent: itemsDiv, items: item.items});
}

};

levelData.parent.appendChild(div);

// optimised CSS custom property getter/setter


var CustomStyle = (function CustomStyleClosure() {
// As noted on: http://www.zachstronaut.com/posts/2009/02/17/
//
animate-css-transforms-firefox-webkit.html
// in some versions of IE9 it is critical that ms appear in this list
// before Moz
var prefixes = ['ms', 'Moz', 'Webkit', 'O'];
var _cache = { };
function CustomStyle() {
}
CustomStyle.getProp = function get(propName, element) {
// check cache only when no element is given
if (arguments.length == 1 && typeof _cache[propName] == 'string') {
return _cache[propName];
}
element = element || document.documentElement;
var style = element.style, prefixed, uPropName;
// test standard property first
if (typeof style[propName] == 'string') {
return (_cache[propName] = propName);
}
// capitalize
uPropName = propName.charAt(0).toUpperCase() + propName.slice(1);
// test vendor specific properties
for (var i = 0, l = prefixes.length; i < l; i++) {
prefixed = prefixes[i] + uPropName;
if (typeof style[prefixed] == 'string') {
return (_cache[propName] = prefixed);
}
}
//if all fails then set to undefined
return (_cache[propName] = 'undefined');

};

CustomStyle.setProp = function set(propName, element, str) {


var prop = this.getProp(propName);
if (prop != 'undefined')
element.style[prop] = str;
};
return CustomStyle;
})();
var TextLayerBuilder = function textLayerBuilder(textLayerDiv, pageIdx) {
var textLayerFrag = document.createDocumentFragment();
this.textLayerDiv = textLayerDiv;
this.layoutDone = false;
this.divContentDone = false;
this.pageIdx = pageIdx;
this.matches = [];

this.beginLayout = function textLayerBuilderBeginLayout() {


this.textDivs = [];
this.textLayerQueue = [];
this.renderingDone = false;
};
this.endLayout = function textLayerBuilderEndLayout() {
this.layoutDone = true;
this.insertDivContent();
};
this.renderLayer = function textLayerBuilderRenderLayer() {
var self = this;
var textDivs = this.textDivs;
var textLayerDiv = this.textLayerDiv;
var canvas = document.createElement('canvas');
var ctx = canvas.getContext('2d');
// No point in rendering so many divs as it'd make the browser unusable
// even after the divs are rendered
var MAX_TEXT_DIVS_TO_RENDER = 100000;
if (textDivs.length > MAX_TEXT_DIVS_TO_RENDER)
return;
for (var i = 0, ii = textDivs.length; i < ii; i++) {
var textDiv = textDivs[i];
textLayerFrag.appendChild(textDiv);
ctx.font = textDiv.style.fontSize + ' ' + textDiv.style.fontFamily;
var width = ctx.measureText(textDiv.textContent).width;
if (width > 0) {
var textScale = textDiv.dataset.canvasWidth / width;
CustomStyle.setProp('transform' , textDiv,
'scale(' + textScale + ', 1)');
CustomStyle.setProp('transformOrigin' , textDiv, '0% 0%');

textLayerDiv.appendChild(textDiv);

this.renderingDone = true;
this.updateMatches();
textLayerDiv.appendChild(textLayerFrag);

};

this.setupRenderLayoutTimer = function textLayerSetupRenderLayoutTimer() {


// Schedule renderLayout() if user has been scrolling, otherwise
// run it right away
var RENDER_DELAY = 200; // in ms
var self = this;
if (Date.now() - PDFView.lastScroll > RENDER_DELAY) {
// Render right away
this.renderLayer();
} else {
// Schedule
if (this.renderTimer)

clearTimeout(this.renderTimer);
this.renderTimer = setTimeout(function() {
self.setupRenderLayoutTimer();
}, RENDER_DELAY);

};

this.appendText = function textLayerBuilderAppendText(geom) {


var textDiv = document.createElement('div');
// vScale and hScale already contain the scaling to pixel units
var fontHeight = geom.fontSize * geom.vScale;
textDiv.dataset.canvasWidth = geom.canvasWidth * geom.hScale;
textDiv.dataset.fontName = geom.fontName;
textDiv.style.fontSize = fontHeight + 'px';
textDiv.style.fontFamily = geom.fontFamily;
textDiv.style.left = geom.x + 'px';
textDiv.style.top = (geom.y - fontHeight) + 'px';
// The content of the div is set in the `setTextContent` function.
this.textDivs.push(textDiv);

};

this.insertDivContent = function textLayerUpdateTextContent() {


// Only set the content of the divs once layout has finished, the content
// for the divs is available and content is not yet set on the divs.
if (!this.layoutDone || this.divContentDone || !this.textContent)
return;
this.divContentDone = true;
var textDivs = this.textDivs;
var bidiTexts = this.textContent.bidiTexts;
for (var i = 0; i < bidiTexts.length; i++) {
var bidiText = bidiTexts[i];
var textDiv = textDivs[i];

textDiv.textContent = bidiText.str;
textDiv.dir = bidiText.ltr ? 'ltr' : 'rtl';

this.setupRenderLayoutTimer();

};

this.setTextContent = function textLayerBuilderSetTextContent(textContent) {


this.textContent = textContent;
this.insertDivContent();
};
this.convertMatches = function textLayerBuilderConvertMatches(matches) {
var i = 0;
var iIndex = 0;
var bidiTexts = this.textContent.bidiTexts;
var end = bidiTexts.length - 1;
var queryLen = PDFFindController.state.query.length;
var lastDivIdx = -1;

var pos;
var ret = [];
// Loop over all the matches.
for (var m = 0; m < matches.length; m++) {
var matchIdx = matches[m];
// # Calculate the begin position.
// Loop over the divIdxs.
while (i !== end && matchIdx >= (iIndex + bidiTexts[i].str.length)) {
iIndex += bidiTexts[i].str.length;
i++;
}
// TODO: Do proper handling here if something goes wrong.
if (i == bidiTexts.length) {
console.error('Could not find matching mapping');
}
var match = {
begin: {
divIdx: i,
offset: matchIdx - iIndex
}
};
// # Calculate the end position.
matchIdx += queryLen;
// Somewhat same array as above, but use a > instead of >= to get the end
// position right.
while (i !== end && matchIdx > (iIndex + bidiTexts[i].str.length)) {
iIndex += bidiTexts[i].str.length;
i++;
}

match.end = {
divIdx: i,
offset: matchIdx - iIndex
};
ret.push(match);

return ret;

};

this.renderMatches = function textLayerBuilder_renderMatches(matches) {


// Early exit if there is nothing to render.
if (matches.length === 0) {
return;
}
var
var
var
var
var
var

bidiTexts = this.textContent.bidiTexts;
textDivs = this.textDivs;
prevEnd = null;
isSelectedPage = this.pageIdx === PDFFindController.selected.pageIdx;
selectedMatchIdx = PDFFindController.selected.matchIdx;
highlightAll = PDFFindController.state.highlightAll;

var infty = {
divIdx: -1,
offset: undefined
};
function beginText(begin, className) {
var divIdx = begin.divIdx;
var div = textDivs[divIdx];
div.textContent = '';

var content = bidiTexts[divIdx].str.substring(0, begin.offset);


var node = document.createTextNode(content);
if (className) {
var isSelected = isSelectedPage &&
divIdx === selectedMatchIdx;
var span = document.createElement('span');
span.className = className + (isSelected ? ' selected' : '');
span.appendChild(node);
div.appendChild(span);
return;
}
div.appendChild(node);

function appendText(from, to, className) {


var divIdx = from.divIdx;
var div = textDivs[divIdx];

var content = bidiTexts[divIdx].str.substring(from.offset, to.offset);


var node = document.createTextNode(content);
if (className) {
var span = document.createElement('span');
span.className = className;
span.appendChild(node);
div.appendChild(span);
return;
}
div.appendChild(node);

function highlightDiv(divIdx, className) {


textDivs[divIdx].className = className;
}
var i0 = selectedMatchIdx, i1 = i0 + 1, i;
if (highlightAll) {
i0 = 0;
i1 = matches.length;
} else if (!isSelectedPage) {
// Not highlighting all and this isn't the selected page, so do nothing.
return;
}
for (i = i0; i < i1; i++) {
var match = matches[i];
var begin = match.begin;
var end = match.end;
var isSelected = isSelectedPage && i === selectedMatchIdx;

var highlightSuffix = (isSelected ? ' selected' : '');


if (isSelected)
scrollIntoView(textDivs[begin.divIdx], {top: -50});
// Match inside new div.
if (!prevEnd || begin.divIdx !== prevEnd.divIdx) {
// If there was a previous div, then add the text at the end
if (prevEnd !== null) {
appendText(prevEnd, infty);
}
// clears the divs and set the content until the begin point.
beginText(begin);
} else {
appendText(prevEnd, begin);
}

if (begin.divIdx === end.divIdx) {


appendText(begin, end, 'highlight' + highlightSuffix);
} else {
appendText(begin, infty, 'highlight begin' + highlightSuffix);
for (var n = begin.divIdx + 1; n < end.divIdx; n++) {
highlightDiv(n, 'highlight middle' + highlightSuffix);
}
beginText(end, 'highlight end' + highlightSuffix);
}
prevEnd = end;

if (prevEnd) {
appendText(prevEnd, infty);
}

};

this.updateMatches = function textLayerUpdateMatches() {


// Only show matches, once all rendering is done.
if (!this.renderingDone)
return;
// Clear out all matches.
var matches = this.matches;
var textDivs = this.textDivs;
var bidiTexts = this.textContent.bidiTexts;
var clearedUntilDivIdx = -1;
// Clear out all current matches.
for (var i = 0; i < matches.length; i++) {
var match = matches[i];
var begin = Math.max(clearedUntilDivIdx, match.begin.divIdx);
for (var n = begin; n <= match.end.divIdx; n++) {
var div = textDivs[n];
div.textContent = bidiTexts[n].str;
div.className = '';
}
clearedUntilDivIdx = match.end.divIdx + 1;
}
if (!PDFFindController.active)
return;
// Convert the matches on the page controller into the match format used

// for the textLayer.


this.matches = matches =
this.convertMatches(PDFFindController.pageMatches[this.pageIdx] || []);
this.renderMatches(this.matches);

};

};

document.addEventListener('DOMContentLoaded', function webViewerLoad(evt) {


PDFView.initialize();
var params = PDFView.parseQueryString(document.location.search.substring(1));
var file = window.location.toString()
document.getElementById('openFile').setAttribute('hidden', 'true');
// Special debugging flags in the hash section of the URL.
var hash = document.location.hash.substring(1);
var hashParams = PDFView.parseQueryString(hash);
if ('disableWorker' in hashParams)
PDFJS.disableWorker = (hashParams['disableWorker'] === 'true');
if ('textLayer' in hashParams) {
switch (hashParams['textLayer']) {
case 'off':
PDFJS.disableTextLayer = true;
break;
case 'visible':
case 'shadow':
case 'hover':
var viewer = document.getElementById('viewer');
viewer.classList.add('textLayer-' + hashParams['textLayer']);
break;
}
}
if ('pdfBug' in hashParams && FirefoxCom.requestSync('pdfBugEnabled')) {
PDFJS.pdfBug = true;
var pdfBug = hashParams['pdfBug'];
var enabled = pdfBug.split(',');
PDFBug.enable(enabled);
PDFBug.init();
}
if (!PDFView.supportsPrinting) {
document.getElementById('print').classList.add('hidden');
}
if (!PDFView.supportsFullscreen) {
document.getElementById('fullscreen').classList.add('hidden');
}
if (PDFView.supportsIntegratedFind) {
document.querySelector('#viewFind').classList.add('hidden');
}
// Listen for warnings to trigger the fallback UI. Errors should be caught
// and call PDFView.error() so we don't need to listen for those.

PDFJS.LogManager.addLogger({
warn: function() {
PDFView.fallback();
}
});
var mainContainer = document.getElementById('mainContainer');
var outerContainer = document.getElementById('outerContainer');
mainContainer.addEventListener('transitionend', function(e) {
if (e.target == mainContainer) {
var event = document.createEvent('UIEvents');
event.initUIEvent('resize', false, false, window, 0);
window.dispatchEvent(event);
outerContainer.classList.remove('sidebarMoving');
}
}, true);
document.getElementById('sidebarToggle').addEventListener('click',
function() {
this.classList.toggle('toggled');
outerContainer.classList.add('sidebarMoving');
outerContainer.classList.toggle('sidebarOpen');
PDFView.sidebarOpen = outerContainer.classList.contains('sidebarOpen');
PDFView.renderHighestPriority();
});
document.getElementById('viewThumbnail').addEventListener('click',
function() {
PDFView.switchSidebarView('thumbs');
});
document.getElementById('viewOutline').addEventListener('click',
function() {
PDFView.switchSidebarView('outline');
});
document.getElementById('previous').addEventListener('click',
function() {
PDFView.page--;
});
document.getElementById('next').addEventListener('click',
function() {
PDFView.page++;
});
document.querySelector('.zoomIn').addEventListener('click',
function() {
PDFView.zoomIn();
});
document.querySelector('.zoomOut').addEventListener('click',
function() {
PDFView.zoomOut();
});
document.getElementById('fullscreen').addEventListener('click',
function() {
PDFView.fullscreen();
});

document.getElementById('openFile').addEventListener('click',
function() {
document.getElementById('fileInput').click();
});
document.getElementById('print').addEventListener('click',
function() {
window.print();
});
document.getElementById('download').addEventListener('click',
function() {
PDFView.download();
});
document.getElementById('pageNumber').addEventListener('change',
function() {
PDFView.page = this.value;
});
document.getElementById('scaleSelect').addEventListener('change',
function() {
PDFView.parseScale(this.value);
});
document.getElementById('first_page').addEventListener('click',
function() {
PDFView.page = 1;
});
document.getElementById('last_page').addEventListener('click',
function() {
PDFView.page = PDFView.pdfDocument.numPages;
});
document.getElementById('page_rotate_ccw').addEventListener('click',
function() {
PDFView.rotatePages(-90);
});
document.getElementById('page_rotate_cw').addEventListener('click',
function() {
PDFView.rotatePages(90);
});
if (FirefoxCom.requestSync('getLoadingType') == 'passive') {
PDFView.setTitleUsingUrl(file);
PDFView.initPassiveLoading();
return;
}
PDFView.open(file, 0);
}, true);
function updateViewarea() {
if (!PDFView.initialized)
return;
var visible = PDFView.getVisiblePages();

var visiblePages = visible.views;


if (visiblePages.length === 0) {
return;
}
PDFView.renderHighestPriority();
var currentId = PDFView.page;
var firstPage = visible.first;
for (var i = 0, ii = visiblePages.length, stillFullyVisible = false;
i < ii; ++i) {
var page = visiblePages[i];
if (page.percent < 100)
break;

if (page.id === PDFView.page) {


stillFullyVisible = true;
break;
}

if (!stillFullyVisible) {
currentId = visiblePages[0].id;
}
if (!PDFView.isFullscreen) {
updateViewarea.inProgress = true; // used in "set page"
PDFView.page = currentId;
updateViewarea.inProgress = false;
}
var currentScale = PDFView.currentScale;
var currentScaleValue = PDFView.currentScaleValue;
var normalizedScaleValue = currentScaleValue == currentScale ?
currentScale * 100 : currentScaleValue;
var pageNumber = firstPage.id;
var pdfOpenParams = '#page=' + pageNumber;
pdfOpenParams += '&zoom=' + normalizedScaleValue;
var currentPage = PDFView.pages[pageNumber - 1];
var topLeft = currentPage.getPagePoint(PDFView.container.scrollLeft,
(PDFView.container.scrollTop - firstPage.y));
pdfOpenParams += ',' + Math.round(topLeft[0]) + ',' + Math.round(topLeft[1]);

var store = PDFView.store;


store.initializedPromise.then(function() {
store.set('exists', true);
store.set('page', pageNumber);
store.set('zoom', normalizedScaleValue);
store.set('scrollLeft', Math.round(topLeft[0]));
store.set('scrollTop', Math.round(topLeft[1]));
});
var href = PDFView.getAnchorUrl(pdfOpenParams);
document.getElementById('viewBookmark').href = href;

window.addEventListener('resize', function webViewerResize(evt) {


if (PDFView.initialized &&

(document.getElementById('pageWidthOption').selected ||
document.getElementById('pageFitOption').selected ||
document.getElementById('pageAutoOption').selected))
PDFView.parseScale(document.getElementById('scaleSelect').value);
updateViewarea();
});
window.addEventListener('hashchange', function webViewerHashchange(evt) {
PDFView.setHash(document.location.hash.substring(1));
});
window.addEventListener('change', function webViewerChange(evt) {
var files = evt.target.files;
if (!files || files.length == 0)
return;
// Read the local file into a Uint8Array.
var fileReader = new FileReader();
fileReader.onload = function webViewerChangeFileReaderOnload(evt) {
var buffer = evt.target.result;
var uint8Array = new Uint8Array(buffer);
PDFView.open(uint8Array, 0);
};
var file = files[0];
fileReader.readAsArrayBuffer(file);
PDFView.setTitleUsingUrl(file.name);
// URL does not reflect proper document location - hiding some icons.
document.getElementById('viewBookmark').setAttribute('hidden', 'true');
document.getElementById('download').setAttribute('hidden', 'true');
}, true);
function selectScaleOption(value) {
var options = document.getElementById('scaleSelect').options;
var predefinedValueFound = false;
for (var i = 0; i < options.length; i++) {
var option = options[i];
if (option.value != value) {
option.selected = false;
continue;
}
option.selected = true;
predefinedValueFound = true;
}
return predefinedValueFound;
}
window.addEventListener('localized', function localized(evt) {
document.getElementsByTagName('html')[0].dir = mozL10n.language.direction;
}, true);
window.addEventListener('scalechange', function scalechange(evt) {
var customScaleOption = document.getElementById('customScaleOption');
customScaleOption.selected = false;
if (!evt.resetAutoSettings &&
(document.getElementById('pageWidthOption').selected ||
document.getElementById('pageFitOption').selected ||
document.getElementById('pageAutoOption').selected)) {

updateViewarea();
return;

var predefinedValueFound = selectScaleOption('' + evt.scale);


if (!predefinedValueFound) {
customScaleOption.textContent = Math.round(evt.scale * 10000) / 100 + '%';
customScaleOption.selected = true;
}
updateViewarea();
}, true);
window.addEventListener('pagechange', function pagechange(evt) {
var page = evt.pageNumber;
if (document.getElementById('pageNumber').value != page) {
document.getElementById('pageNumber').value = page;
var selected = document.querySelector('.thumbnail.selected');
if (selected)
selected.classList.remove('selected');
var thumbnail = document.getElementById('thumbnailContainer' + page);
thumbnail.classList.add('selected');
var visibleThumbs = PDFView.getVisibleThumbs();
var numVisibleThumbs = visibleThumbs.views.length;
// If the thumbnail isn't currently visible scroll it into view.
if (numVisibleThumbs > 0) {
var first = visibleThumbs.first.id;
// Account for only one thumbnail being visible.
var last = numVisibleThumbs > 1 ?
visibleThumbs.last.id : first;
if (page <= first || page >= last)
scrollIntoView(thumbnail);
}
}
document.getElementById('previous').disabled = (page <= 1);
document.getElementById('next').disabled = (page >= PDFView.pages.length);
}, true);
// Firefox specific event, so that we can prevent browser from zooming
window.addEventListener('DOMMouseScroll', function(evt) {
if (evt.ctrlKey) {
evt.preventDefault();
var ticks = evt.detail;
var direction = (ticks > 0) ? 'zoomOut' : 'zoomIn';
for (var i = 0, length = Math.abs(ticks); i < length; i++)
PDFView[direction]();
} else if (PDFView.isFullscreen) {
var FIREFOX_DELTA_FACTOR = -40;
PDFView.mouseScroll(evt.detail * FIREFOX_DELTA_FACTOR);
}
}, false);
window.addEventListener('mousemove', function keydown(evt) {
if (PDFView.isFullscreen) {
PDFView.showPresentationControls();
}
}, false);

window.addEventListener('mousedown', function mousedown(evt) {


if (PDFView.isFullscreen && evt.button === 0) {
// Mouse click in fullmode advances a page
evt.preventDefault();
}

PDFView.page++;

}, false);
window.addEventListener('keydown', function keydown(evt) {
var handled = false;
var cmd = (evt.ctrlKey ? 1 : 0) |
(evt.altKey ? 2 : 0) |
(evt.shiftKey ? 4 : 0) |
(evt.metaKey ? 8 : 0);
// First, handle the key bindings that are independent whether an input
// control is selected or not.
if (cmd == 1 || cmd == 8) { // either CTRL or META key.
switch (evt.keyCode) {
case 70:
if (!PDFView.supportsIntegratedFind) {
PDFFindBar.toggle();
handled = true;
}
break;
case 61: // FF/Mac '='
case 107: // FF '+' and '='
case 187: // Chrome '+'
PDFView.zoomIn();
handled = true;
break;
case 173: // FF/Mac '-'
case 109: // FF '-'
case 189: // Chrome '-'
PDFView.zoomOut();
handled = true;
break;
case 48: // '0'
PDFView.parseScale(DEFAULT_SCALE, true);
handled = true;
break;
}
}
// CTRL or META with or without SHIFT.
if (cmd == 1 || cmd == 8 || cmd == 5 || cmd == 12) {
switch (evt.keyCode) {
case 71: // g
if (!PDFView.supportsIntegratedFind) {
PDFFindBar.dispatchEvent('again', cmd == 5 || cmd == 12);
handled = true;
}
break;
}
}
if (handled) {
evt.preventDefault();
return;

}
// Some shortcuts should not get handled if a control/input element
// is selected.
var curElement = document.activeElement;
if (curElement && (curElement.tagName == 'INPUT' ||
curElement.tagName == 'SELECT')) {
return;
}
var controlsElement = document.getElementById('toolbar');
while (curElement) {
if (curElement === controlsElement && !PDFView.isFullscreen)
return; // ignoring if the 'toolbar' element is focused
curElement = curElement.parentNode;
}
if (cmd == 0) { // no control key pressed at all.
switch (evt.keyCode) {
case 38: // up arrow
case 33: // pg up
case 8: // backspace
if (!PDFView.isFullscreen) {
break;
}
// in fullscreen mode falls throw here
case 37: // left arrow
case 75: // 'k'
case 80: // 'p'
PDFView.page--;
handled = true;
break;
case 40: // down arrow
case 34: // pg down
case 32: // spacebar
if (!PDFView.isFullscreen) {
break;
}
// in fullscreen mode falls throw here
case 39: // right arrow
case 74: // 'j'
case 78: // 'n'
PDFView.page++;
handled = true;
break;
case 36: // home
if (PDFView.isFullscreen) {
PDFView.page = 1;
handled = true;
}
break;
case 35: // end
if (PDFView.isFullscreen) {
PDFView.page = PDFView.pdfDocument.numPages;
handled = true;
}
break;
case 82: // 'r'
PDFView.rotatePages(90);

break;

if (cmd == 4) { // shift-key
switch (evt.keyCode) {
case 82: // 'r'
PDFView.rotatePages(-90);
break;
}
}
if (handled) {
evt.preventDefault();
PDFView.clearMouseScrollState();
}
});
window.addEventListener('beforeprint', function beforePrint(evt) {
PDFView.beforePrint();
});
window.addEventListener('afterprint', function afterPrint(evt) {
PDFView.afterPrint();
});
(function fullscreenClosure() {
function fullscreenChange(e) {
var isFullscreen = document.fullscreenElement || document.mozFullScreen ||
document.webkitIsFullScreen;

if (!isFullscreen) {
PDFView.exitFullscreen();
}

window.addEventListener('fullscreenchange', fullscreenChange, false);


window.addEventListener('mozfullscreenchange', fullscreenChange, false);
window.addEventListener('webkitfullscreenchange', fullscreenChange, false);
})();
<!DOCTYPE html>
<!-Copyright 2012 Mozilla Foundation
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
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html dir="ltr" mozdisallowselectionprint=""><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximumscale=1">
<title>ley_29497_trabajo.pdf</title>
<!-- This snippet is used in firefox extension, see Makefile -->
<!-- base href="resource://pdf.js/web/" -->
<script type="text/javascript" src="ley_29497_trabajo.pdf_files/l10n.js"></scrip
t>
<script type="text/javascript" src="ley_29497_trabajo.pdf_files/pdf.js"></script
>
<link rel="stylesheet" href="ley_29497_trabajo.pdf_files/viewer.css">

<script type="text/javascript" src="ley_29497_trabajo.pdf_files/debugger.js"


></script>
<script type="text/javascript" src="ley_29497_trabajo.pdf_files/viewer.js"><
/script>
<style id="PDFJS_FONT_STYLE_TAG"></style></head>
<body>
<div id="outerContainer">
<div id="sidebarContainer">
<div id="toolbarSidebar">
<div class="splitToolbarButton toggled">
<button id="viewThumbnail" class="toolbarButton group toggled" title
="Mostrar miniaturas" tabindex="1" data-l10n-id="thumbs">
<span data-l10n-id="thumbs_label">Miniaturas</span>
</button>
<button id="viewOutline" class="toolbarButton group" title="Mostrar
el esquema del documento" tabindex="2" data-l10n-id="outline">
<span data-l10n-id="outline_label">Esquema del documento</span>
</button>
</div>
</div>
<div id="sidebarContent">
<div id="thumbnailView"><a title="Pgina 1" href="http://www.mintra.gob.p
e/LEYPROCESALTRABAJO/pdf/ley_29497_trabajo.pdf#page=1"><div data-loaded="true" c
lass="thumbnail" id="thumbnailContainer1"><div style="width: 98px; height: 138.6
31px;" class="thumbnailSelectionRing"><canvas aria-label="Miniatura de la pgina 1"
class="thumbnailImage" height="138" width="98" moz-opaque="" id="thumbnail1"></
canvas></div></div></a><a title="Pgina 2" href="http://www.mintra.gob.pe/LEYPROCES
ALTRABAJO/pdf/ley_29497_trabajo.pdf#page=2"><div data-loaded="true" class="thumb
nail" id="thumbnailContainer2"><div style="width: 98px; height: 138.631px;" clas
s="thumbnailSelectionRing"><canvas aria-label="Miniatura de la pgina 2" class="thu
mbnailImage" height="138" width="98" moz-opaque="" id="thumbnail2"></canvas></di
v></div></a><a title="Pgina 3" href="http://www.mintra.gob.pe/LEYPROCESALTRABAJO/p
df/ley_29497_trabajo.pdf#page=3"><div data-loaded="true" class="thumbnail select
ed" id="thumbnailContainer3"><div style="width: 98px; height: 138.631px;" class=
"thumbnailSelectionRing"><canvas aria-label="Miniatura de la pgina 3" class="thumb
nailImage" height="138" width="98" moz-opaque="" id="thumbnail3"></canvas></div>
</div></a><a title="Pgina 4" href="http://www.mintra.gob.pe/LEYPROCESALTRABAJO/pdf
/ley_29497_trabajo.pdf#page=4"><div data-loaded="true" class="thumbnail" id="thu

mbnailContainer4"><div style="width: 98px; height: 138.631px;" class="thumbnailS


electionRing"><canvas aria-label="Miniatura de la pgina 4" class="thumbnailImage"
height="138" width="98" moz-opaque="" id="thumbnail4"></canvas></div></div></a><
a title="Pgina 5" href="http://www.mintra.gob.pe/LEYPROCESALTRABAJO/pdf/ley_29497_
trabajo.pdf#page=5"><div class="thumbnail" id="thumbnailContainer5"><div style="
width: 98px; height: 138.631px;" class="thumbnailSelectionRing"></div></div></a>
<a title="Pgina 6" href="http://www.mintra.gob.pe/LEYPROCESALTRABAJO/pdf/ley_29497
_trabajo.pdf#page=6"><div class="thumbnail" id="thumbnailContainer6"><div style=
"width: 98px; height: 138.631px;" class="thumbnailSelectionRing"></div></div></a
><a title="Pgina 7" href="http://www.mintra.gob.pe/LEYPROCESALTRABAJO/pdf/ley_2949
7_trabajo.pdf#page=7"><div class="thumbnail" id="thumbnailContainer7"><div style
="width: 98px; height: 138.631px;" class="thumbnailSelectionRing"></div></div></
a><a title="Pgina 8" href="http://www.mintra.gob.pe/LEYPROCESALTRABAJO/pdf/ley_294
97_trabajo.pdf#page=8"><div class="thumbnail" id="thumbnailContainer8"><div styl
e="width: 98px; height: 138.631px;" class="thumbnailSelectionRing"></div></div><
/a><a title="Pgina 9" href="http://www.mintra.gob.pe/LEYPROCESALTRABAJO/pdf/ley_29
497_trabajo.pdf#page=9"><div class="thumbnail" id="thumbnailContainer9"><div sty
le="width: 98px; height: 138.631px;" class="thumbnailSelectionRing"></div></div>
</a><a title="Pgina 10" href="http://www.mintra.gob.pe/LEYPROCESALTRABAJO/pdf/ley_
29497_trabajo.pdf#page=10"><div class="thumbnail" id="thumbnailContainer10"><div
style="width: 98px; height: 138.631px;" class="thumbnailSelectionRing"></div></
div></a><a title="Pgina 11" href="http://www.mintra.gob.pe/LEYPROCESALTRABAJO/pdf/
ley_29497_trabajo.pdf#page=11"><div class="thumbnail" id="thumbnailContainer11">
<div style="width: 98px; height: 138.631px;" class="thumbnailSelectionRing"></di
v></div></a></div>
<div id="outlineView" class="hidden"><div class="noOutline">No hay un
esquema disponible</div></div>
</div>
</div> <!-- sidebarContainer -->
<div id="mainContainer">
<div class="findbar hidden doorHanger" id="findbar">
<label for="findInput" class="toolbarLabel" data-l10n-id="find_label">
Buscar:</label>
<input id="findInput" class="toolbarField" tabindex="20">
<div class="splitToolbarButton">
<button class="toolbarButton findPrevious" title="Encontrar la anter
ior aparicin de la frase" id="findPrevious" tabindex="21" data-l10n-id="find_previ
ous">
<span data-l10n-id="find_previous_label">Anterior</span>
</button>
<div class="splitToolbarButtonSeparator"></div>
<button class="toolbarButton findNext" title="Encontrar la siguiente
aparicin de esta frase" id="findNext" tabindex="22" data-l10n-id="find_next">
<span data-l10n-id="find_next_label">Siguiente</span>
</button>
</div>
<input id="findHighlightAll" class="toolbarField" type="checkbox">
<label for="findHighlightAll" class="toolbarLabel" tabindex="23" datal10n-id="find_highlight">Remarcar todos</label>
<input id="findMatchCase" class="toolbarField" type="checkbox">
<label for="findMatchCase" class="toolbarLabel" tabindex="24" data-l10
n-id="find_match_case_label">Coincidencia de mays./mins.</label>
<span id="findMsg" class="toolbarLabel"></span>
</div>
<div class="toolbar">
<div id="toolbarContainer">
<div id="toolbarViewer">
<div id="toolbarViewerLeft">
<button id="sidebarToggle" class="toolbarButton" title="Cambiar

control deslizante" tabindex="3" data-l10n-id="toggle_slider">


<span data-l10n-id="toggle_slider_label">Cambiar control desli
zante</span>
</button>
<div class="toolbarButtonSpacer"></div>
<button id="viewFind" class="toolbarButton group hidden" title="
Buscar en el documento" tabindex="4" data-l10n-id="findbar">
<span data-l10n-id="findbar_label">Buscar</span>
</button>
<div class="splitToolbarButton">
<button class="toolbarButton pageUp" title="Pgina anterior" id="
previous" tabindex="5" data-l10n-id="previous">
<span data-l10n-id="previous_label">Anterior</span>
</button>
<div class="splitToolbarButtonSeparator"></div>
<button class="toolbarButton pageDown" title="Pgina siguiente" i
d="next" tabindex="6" data-l10n-id="next">
<span data-l10n-id="next_label">Siguiente</span>
</button>
</div>
<label id="pageNumberLabel" class="toolbarLabel" for="pageNumber
" data-l10n-id="page_label">Pgina:</label>
<input max="11" id="pageNumber" class="toolbarField pageNumber"
value="3" size="4" min="1" tabindex="7" type="number">
<span id="numPages" class="toolbarLabel">de 11</span>
</div>
<div id="toolbarViewerRight">
<input id="fileInput" class="fileInput" oncontextmenu="return fa
lse;" style="visibility: hidden; position: fixed; right: 0; top: 0" type="file">
<button id="fullscreen" class="toolbarButton fullscreen" title="
Cambiar al modo presentacin" tabindex="11" data-l10n-id="presentation_mode">
<span data-l10n-id="presentation_mode_label">Modo presentacin</s
pan>
</button>
<button id="openFile" class="toolbarButton openFile" title="Abri
r archivo" tabindex="12" data-l10n-id="open_file" hidden="true">
<span data-l10n-id="open_file_label">Abrir</span>
</button>
<button id="print" class="toolbarButton print" title="Imprimir"
tabindex="13" data-l10n-id="print">
<span data-l10n-id="print_label">Imprimir</span>
</button>
<button id="download" class="toolbarButton download" title="Desc
argar" tabindex="14" data-l10n-id="download">
<span data-l10n-id="download_label">Descargar</span>
</button>
<!-- <div class="toolbarButtonSpacer"></div> -->
<a href="http://www.mintra.gob.pe/LEYPROCESALTRABAJO/pdf/ley_294
97_trabajo.pdf#page=3&amp;zoom=110.00000000000001,0,842" id="viewBookmark" class
="toolbarButton bookmark" title="Vista actual (copiar o abrir en una nueva venta
na)" tabindex="15" data-l10n-id="bookmark"><span data-l10n-id="bookmark_label">V
ista actual</span></a>
</div>
<div class="outerCenter">

<div class="innerCenter" id="toolbarViewerMiddle">


<div class="splitToolbarButton">
<button class="toolbarButton zoomOut" title="Reducir" tabind
ex="8" data-l10n-id="zoom_out">
<span data-l10n-id="zoom_out_label">Reducir</span>
</button>
<div class="splitToolbarButtonSeparator"></div>
<button class="toolbarButton zoomIn" title="Aumentar" tabind
ex="9" data-l10n-id="zoom_in">
<span data-l10n-id="zoom_in_label">Aumentar</span>
</button>
</div>
<span id="scaleSelectContainer" class="dropdownToolbarButton">
<select id="scaleSelect" title="Tamao" oncontextmenu="return
false;" tabindex="10" data-l10n-id="zoom">
<option id="pageAutoOption" value="auto" data-l10n-id="pag
e_scale_auto">Tamao automtico</option>
<option id="pageActualOption" value="page-actual" data-l10
n-id="page_scale_actual">Tamao actual</option>
<option id="pageFitOption" value="page-fit" data-l10n-id="
page_scale_fit">Ajuste de la pgina</option>
<option id="pageWidthOption" value="page-width" data-l10nid="page_scale_width">Anchura de la pgina</option>
<option selected="selected" id="customScaleOption" value="
custom">110%</option>
<option value="0.5">50%</option>
<option value="0.75">75%</option>
<option value="1">100%</option>
<option value="1.25">125%</option>
<option value="1.5">150%</option>
<option value="2">200%</option>
</select>
</span>
</div>
</div>
</div>
</div>
</div>
<menu type="context" id="viewerContextMenu">
<menuitem label="Ir a la primera pgina" id="first_page" data-l10n-id="fi
rst_page"></menuitem>
<menuitem label="Ir a la ltima pgina" id="last_page" data-l10n-id="last_pa
ge"></menuitem>
<menuitem label="Rotar en el sentido contrario de las agujas del reloj
" id="page_rotate_ccw" data-l10n-id="page_rotate_ccw"></menuitem>
<menuitem label="Rotar en el sentido de las agujas del reloj" id="page
_rotate_cw" data-l10n-id="page_rotate_cw"></menuitem>
</menu>
<div id="viewerContainer">
<div id="viewer" contextmenu="viewerContextMenu"><a name="1"></a><div
style="width: 872px; height: 1234px;" class="page" id="pageContainer1"><div clas
s="loadingIcon"></div></div><a name="2"></a><div style="width: 872px; height: 12
34px;" class="page" id="pageContainer2"><div class="loadingIcon"></div></div><a
name="3"></a><div data-loaded="true" style="width: 872px; height: 1234px;" class
="page" id="pageContainer3"><canvas height="1234" width="872" moz-opaque="" id="
page3"></canvas><div class="textLayer"><div dir="ltr" style="font-size: 16.1333p
x; font-family: sans-serif; left: 365.376px; top: 132.155px; transform: scale(1.
02371, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_1" data-canva

s-width="152.37933213233944">NORMAS LEGALES</div><div dir="ltr" style="font-size


: 8.8px; font-family: sans-serif; left: 129.754px; top: 129.435px; transform: sc
ale(0.767947, 1); transform-origin: 0% 0% 0px;" data-font-name="Helvetica" datacanvas-width="34.55760074901581">El Peruano</div><div dir="ltr" style="font-size
: 8.8px; font-family: sans-serif; left: 129.877px; top: 141.438px; transform: sc
ale(0.770583, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_3" dat
a-canvas-width="111.73448242177966">Lima, viernes 15 de enero de 2010</div><div
dir="ltr" style="font-size: 14.6667px; font-family: sans-serif; left: 704.575px;
top: 133.172px; transform: scale(1.04102, 1); transform-origin: 0% 0% 0px;" dat
a-font-name="g_font_p0_1" data-canvas-width="48.92800106048585">411215</div><div
dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 148.589px
; top: 161.11px; transform: scale(0.940024, 1); transform-origin: 0% 0% 0px;" da
ta-font-name="g_font_p0_75" data-canvas-width="251.92640546035776">4.3 Los juzg
ados especializados de trabajo son </div><div dir="ltr" style="font-size: 11.733
3px; font-family: sans-serif; left: 175.611px; top: 172.844px; transform: scale(
0.938809, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-c
anvas-width="232.82453837966932">competentes para conocer de los siguientes </di
v><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 175
.611px; top: 184.577px; transform: scale(0.927836, 1); transform-origin: 0% 0% 0
px;" data-font-name="g_font_p0_75" data-canvas-width="48.24746771240235">recurso
s:</div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; lef
t: 175.611px; top: 208.044px; transform: scale(0.934737, 1); transform-origin: 0
% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="198.1642709617615">a
) Del recurso de apelacin contra las </div><div dir="ltr" style="font-size: 11.733
3px; font-family: sans-serif; left: 196.403px; top: 219.777px; transform: scale(
0.938476, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-c
anvas-width="230.8650716705323">resoluciones expedidas por los juzgados de </div
><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 196.
403px; top: 231.51px; transform: scale(0.958373, 1); transform-origin: 0% 0% 0px
;" data-font-name="g_font_p0_75" data-canvas-width="173.46560375976568">paz letr
ados en materia laboral; y</div><div dir="ltr" style="font-size: 11.7333px; font
-family: sans-serif; left: 175.611px; top: 243.244px; transform: scale(0.95069,
1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-widt
h="231.0176050071717">b) del recurso de queja por denegatoria del </div><div di
r="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 196.403px; t
op: 254.977px; transform: scale(0.944423, 1); transform-origin: 0% 0% 0px;" data
-font-name="g_font_p0_75" data-canvas-width="200.2176043395997">recurso de apela
cin o por haber sido </div><div dir="ltr" style="font-size: 11.7333px; font-family
: sans-serif; left: 196.403px; top: 266.71px; transform: scale(0.947914, 1); tra
nsform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="223.
7077381820679">concedido en efecto distinto al establecido </div><div dir="ltr"
style="font-size: 11.7333px; font-family: sans-serif; left: 196.403px; top: 278.
444px; transform: scale(0.980607, 1); transform-origin: 0% 0% 0px;" data-font-na
me="g_font_p0_75" data-canvas-width="46.088534332275394">en la ley.</div><div di
r="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 148.589px; t
op: 301.91px; transform: scale(1.0306, 1); transform-origin: 0% 0% 0px;" data-fo
nt-name="g_font_p0_1" data-canvas-width="224.66987153625496">Artculo 5.- Determinacin
de la cuanta</div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-se
rif; left: 148.589px; top: 313.644px; transform: scale(0.945707, 1); transform-o
rigin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="264.79787240
600587">La cuanta est determinada por la suma de todos </div><div dir="ltr" style="f
ont-size: 11.7333px; font-family: sans-serif; left: 129.887px; top: 325.377px; t
ransform: scale(0.948038, 1); transform-origin: 0% 0% 0px;" data-font-name="g_fo
nt_p0_75" data-canvas-width="296.7360064315796">los extremos contenidos en la de
manda, tal como hayan </div><div dir="ltr" style="font-size: 11.7333px; font-fam
ily: sans-serif; left: 129.887px; top: 337.11px; transform: scale(0.932604, 1);
transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="2
79.7813393974305">sido liquidados por el demandante. Los intereses, las </div><d
iv dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 129.887
px; top: 348.844px; transform: scale(0.946612, 1); transform-origin: 0% 0% 0px;"

data-font-name="g_font_p0_75" data-canvas-width="301.96907321167004">costas, lo
s costos y los conceptos que se devenguen con </div><div dir="ltr" style="font-s
ize: 11.7333px; font-family: sans-serif; left: 129.887px; top: 360.577px; transf
orm: scale(0.944281, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0
_75" data-canvas-width="307.83574000549334">posterioridad a la fecha de interpos
icin de la demanda no </div><div dir="ltr" style="font-size: 11.7333px; font-famil
y: sans-serif; left: 129.887px; top: 372.31px; transform: scale(0.945302, 1); tr
ansform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="252
.3957388038635">se consideran en la determinacin de la cuanta.</div><div dir="ltr" s
tyle="font-size: 11.7333px; font-family: sans-serif; left: 148.589px; top: 395.7
77px; transform: scale(1.04744, 1); transform-origin: 0% 0% 0px;" data-font-name
="g_font_p0_1" data-canvas-width="216.82027136611939">Artculo 6.- Competencia por te
rritorio</div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-seri
f; left: 148.589px; top: 407.51px; transform: scale(0.950678, 1); transform-orig
in: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="280.45013941192
633">A eleccin del demandante es competente el juez del </div><div dir="ltr" style
="font-size: 11.7333px; font-family: sans-serif; left: 129.887px; top: 419.244px
; transform: scale(0.937906, 1); transform-origin: 0% 0% 0px;" data-font-name="g
_font_p0_75" data-canvas-width="303.8816065864564">lugar del domicilio principal
del demandado o el del ltimo </div><div dir="ltr" style="font-size: 11.7333px; fo
nt-family: sans-serif; left: 129.887px; top: 430.977px; transform: scale(0.93855
7, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-w
idth="200.8512043533325">lugar donde se prestaron los servicios.</div><div dir="
ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 148.589px; top:
442.71px; transform: scale(0.942523, 1); transform-origin: 0% 0% 0px;" data-fon
t-name="g_font_p0_75" data-canvas-width="266.73387244796754">Si la demanda est dir
igida contra quien prest los </div><div dir="ltr" style="font-size: 11.7333px; fon
t-family: sans-serif; left: 129.887px; top: 454.444px; transform: scale(0.943877
, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-wi
dth="278.4437393684388">servicios, slo es competente el juez del domicilio de </di
v><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 129
.887px; top: 466.177px; transform: scale(0.942143, 1); transform-origin: 0% 0% 0
px;" data-font-name="g_font_p0_75" data-canvas-width="25.43786721801758">ste.</div
><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 148.
589px; top: 477.91px; transform: scale(0.94151, 1); transform-origin: 0% 0% 0px;
" data-font-name="g_font_p0_75" data-canvas-width="275.8624059791566">En la impu
gnacin de laudos arbitrales derivados de </div><div dir="ltr" style="font-size: 11
.7333px; font-family: sans-serif; left: 129.887px; top: 489.644px; transform: sc
ale(0.946691, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" da
ta-canvas-width="293.47413969421393">una negociacin colectiva es competente la sal
a laboral </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-se
rif; left: 129.887px; top: 501.377px; transform: scale(0.946549, 1); transform-o
rigin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="184.57707066
726684">del lugar donde se expidi el laudo.</div><div dir="ltr" style="font-size:
11.7333px; font-family: sans-serif; left: 148.589px; top: 513.11px; transform: s
cale(0.953344, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" d
ata-canvas-width="262.1696056823732">La competencia por razn de territorio slo puede
</div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left
: 129.887px; top: 524.844px; transform: scale(0.952343, 1); transform-origin: 0%
0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="287.6074729003907">se
r prorrogada cuando resulta a favor del prestador de </div><div dir="ltr" style=
"font-size: 11.7333px; font-family: sans-serif; left: 129.887px; top: 536.577px;
transform: scale(0.940246, 1); transform-origin: 0% 0% 0px;" data-font-name="g_
font_p0_75" data-canvas-width="48.8928010597229">servicios.</div><div dir="ltr"
style="font-size: 11.7333px; font-family: sans-serif; left: 148.589px; top: 560.
044px; transform: scale(1.02327, 1); transform-origin: 0% 0% 0px;" data-font-nam
e="g_font_p0_1" data-canvas-width="281.40053943252576">Artculo 7.- Regulacin en caso d
e incompetencia</div><div dir="ltr" style="font-size: 11.7333px; font-family: sa
ns-serif; left: 148.589px; top: 583.51px; transform: scale(0.928083, 1); transfo
rm-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="274.7125

3928756715">7.1 El demandado puede cuestionar la competencia </div><div dir="l


tr" style="font-size: 11.7333px; font-family: sans-serif; left: 175.611px; top:
595.244px; transform: scale(0.948856, 1); transform-origin: 0% 0% 0px;" data-fon
t-name="g_font_p0_75" data-canvas-width="252.39573880386357">del juez por razn de
la materia, cuanta, grado y </div><div dir="ltr" style="font-size: 11.7333px; font
-family: sans-serif; left: 175.611px; top: 606.977px; transform: scale(0.931072,
1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-wid
th="256.0448055496215">territorio mediante excepcin. Sin perjuicio de ello </div><
div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 175.61
1px; top: 618.71px; transform: scale(0.935986, 1); transform-origin: 0% 0% 0px;"
data-font-name="g_font_p0_75" data-canvas-width="249.90827208328247">el juez, e
n cualquier estado y grado del proceso, </div><div dir="ltr" style="font-size: 1
1.7333px; font-family: sans-serif; left: 175.611px; top: 630.444px; transform: s
cale(0.935771, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" d
ata-canvas-width="72.05440156173707">declara, de ofi</div><div dir="ltr" style="
font-size: 11.7333px; font-family: sans-serif; left: 248.898px; top: 630.444px;
transform: scale(0.928172, 1); transform-origin: 0% 0% 0px;" data-font-name="g_f
ont_p0_75" data-canvas-width="167.07093695449828"> cio, la nulidad de lo actuado
y la </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif;
left: 175.611px; top: 642.177px; transform: scale(0.912756, 1); transform-origi
n: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="240.967471889495
84">remisin al rgano jurisdiccional competente si </div><div dir="ltr" style="font-s
ize: 11.7333px; font-family: sans-serif; left: 175.611px; top: 653.91px; transfo
rm: scale(0.928784, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_
75" data-canvas-width="259.1306722831726">determina su incompetencia por razn de m
ateria, </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-seri
f; left: 175.611px; top: 665.644px; transform: scale(0.938623, 1); transform-ori
gin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="249.6736054115
295">cuanta, grado, funcin o territorio no prorrogado.</div><div dir="ltr" style="fo
nt-size: 11.7333px; font-family: sans-serif; left: 148.589px; top: 677.377px; tr
ansform: scale(0.913067, 1); transform-origin: 0% 0% 0px;" data-font-name="g_fon
t_p0_75" data-canvas-width="210.91840457153324">7.2 Tratndose del cuestionamiento
de la </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif;
left: 175.611px; top: 689.11px; transform: scale(0.96278, 1); transform-origin:
0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="244.54613863372805
">competencia del juez por razn de territorio, el </div><div dir="ltr" style="font
-size: 11.7333px; font-family: sans-serif; left: 175.611px; top: 700.844px; tran
sform: scale(0.958297, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_
p0_75" data-canvas-width="249.15733873367319">demandado puede optar, excluyentem
ente, por </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-se
rif; left: 175.611px; top: 712.577px; transform: scale(0.948565, 1); transform-o
rigin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="260.85547232
055666">oponer la incompetencia como excepcin o como </div><div dir="ltr" style="f
ont-size: 11.7333px; font-family: sans-serif; left: 175.611px; top: 724.31px; tr
ansform: scale(0.950224, 1); transform-origin: 0% 0% 0px;" data-font-name="g_fon
t_p0_75" data-canvas-width="253.70987216568">contienda. La competencia de los ju
eces de paz </div><div dir="ltr" style="font-size: 11.7333px; font-family: sansserif; left: 175.611px; top: 736.044px; transform: scale(0.940906, 1); transform
-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="246.517338
67645274">letrados slo se cuestiona mediante excepcin.</div><div dir="ltr" style="fo
nt-size: 11.7333px; font-family: sans-serif; left: 148.589px; top: 747.777px; tr
ansform: scale(0.953517, 1); transform-origin: 0% 0% 0px;" data-font-name="g_fon
t_p0_75" data-canvas-width="244.1002719573975">7.3 La contienda de competencia e
ntre jueces </div><div dir="ltr" style="font-size: 11.7333px; font-family: sansserif; left: 175.611px; top: 759.51px; transform: scale(0.961987, 1); transformorigin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="230.8768050
0412">de trabajo y entre stos y otros juzgados de </div><div dir="ltr" style="font
-size: 11.7333px; font-family: sans-serif; left: 175.611px; top: 771.244px; tran
sform: scale(0.929361, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_
p0_75" data-canvas-width="242.56320525741583">distinta especialidad del mismo di

strito judicial </div><div dir="ltr" style="font-size: 11.7333px; font-family: s


ans-serif; left: 175.611px; top: 782.977px; transform: scale(0.941588, 1); trans
form-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="226.92
26715850831">la dirime la sala laboral de la corte superior </div><div dir="ltr"
style="font-size: 11.7333px; font-family: sans-serif; left: 175.611px; top: 794
.71px; transform: scale(0.945594, 1); transform-origin: 0% 0% 0px;" data-font-na
me="g_font_p0_75" data-canvas-width="235.452805103302">correspondiente. Tratndose
de juzgados de </div><div dir="ltr" style="font-size: 11.7333px; font-family: sa
ns-serif; left: 175.611px; top: 806.444px; transform: scale(0.937338, 1); transf
orm-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="239.958
4052009583">diferentes distritos judiciales, la dirime la Sala </div><div dir="l
tr" style="font-size: 11.7333px; font-family: sans-serif; left: 175.611px; top:
818.177px; transform: scale(0.956609, 1); transform-origin: 0% 0% 0px;" data-fon
t-name="g_font_p0_75" data-canvas-width="245.8485386619568">de Derecho Constituc
ional y Social de la Corte </div><div dir="ltr" style="font-size: 11.7333px; fon
t-family: sans-serif; left: 175.611px; top: 829.91px; transform: scale(0.944791,
1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-wid
th="193.68213753128057">Suprema de Justicia de la Repblica.</div><div dir="ltr" st
yle="font-size: 11.7333px; font-family: sans-serif; left: 244.674px; top: 853.37
7px; transform: scale(1.0258, 1); transform-origin: 0% 0% 0px;" data-font-name="
g_font_p0_1" data-canvas-width="69.75466817855838">CAP TULO II</div><div dir="ltr"
style="font-size: 11.7333px; font-family: sans-serif; left: 227.719px; top: 865.
11px; transform: scale(1.01043, 1); transform-origin: 0% 0% 0px;" data-font-name
="g_font_p0_1" data-canvas-width="104.07466892242431">COMPARECENCIA</div><div di
r="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 148.578px; t
op: 888.577px; transform: scale(1.00941, 1); transform-origin: 0% 0% 0px;" datafont-name="g_font_p0_1" data-canvas-width="275.56907263946545">Artculo 8.- Reglas es
peciales de comparecencia</div><div dir="ltr" style="font-size: 11.7333px; fontfamily: sans-serif; left: 148.578px; top: 912.044px; transform: scale(0.937761,
1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-widt
h="267.2618724594117">8.1 Los menores de edad pueden comparecer sin </div><div
dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 175.6px;
top: 923.777px; transform: scale(0.945602, 1); transform-origin: 0% 0% 0px;" dat
a-font-name="g_font_p0_75" data-canvas-width="254.36693884658825">necesidad de r
epresentante legal. En el caso de </div><div dir="ltr" style="font-size: 11.7333
px; font-family: sans-serif; left: 175.6px; top: 935.51px; transform: scale(0.95
3708, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canva
s-width="253.6864054985047">que un menor de catorce (14) aos comparezca </div><div
dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 175.6px;
top: 947.244px; transform: scale(0.947552, 1); transform-origin: 0% 0% 0px;" dat
a-font-name="g_font_p0_75" data-canvas-width="261.5242723350526">al proceso sin
representante legal, el juez pone la </div><div dir="ltr" style="font-size: 11.7
333px; font-family: sans-serif; left: 175.6px; top: 958.977px; transform: scale(
0.94436, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-ca
nvas-width="254.97707219314586">demanda en conocimiento del Ministerio Pblico </di
v><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 175
.6px; top: 970.71px; transform: scale(0.946222, 1); transform-origin: 0% 0% 0px;
" data-font-name="g_font_p0_75" data-canvas-width="249.8026720809937">para que a
cte segn sus atribuciones. La falta </div><div dir="ltr" style="font-size: 11.7333px
; font-family: sans-serif; left: 175.6px; top: 982.444px; transform: scale(0.948
509, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas
-width="229.53920497512829">de comparecencia del Ministerio Pblico no </div><div d
ir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 175.6px; to
p: 994.177px; transform: scale(0.941267, 1); transform-origin: 0% 0% 0px;" datafont-name="g_font_p0_75" data-canvas-width="182.6058706245423">interfi ere en el
avance del proceso.</div><div dir="ltr" style="font-size: 11.7333px; font-famil
y: sans-serif; left: 148.578px; top: 1005.91px; transform: scale(0.94599, 1); tr
ansform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="266
.7690724487305">8.2 Los sindicatos pueden comparecer al proceso </div><div dir=
"ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 175.6px; top:

1017.64px; transform: scale(0.942709, 1); transform-origin: 0% 0% 0px;" data-fon


t-name="g_font_p0_75" data-canvas-width="224.36480486297611">laboral en causa pr
opia, en defensa de los </div><div dir="ltr" style="font-size: 11.7333px; font-f
amily: sans-serif; left: 175.6px; top: 1029.38px; transform: scale(0.949414, 1);
transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="
214.56747131729128">derechos colectivos y en defensa de sus </div><div dir="ltr"
style="font-size: 11.7333px; font-family: sans-serif; left: 175.6px; top: 1041.
11px; transform: scale(0.92085, 1); transform-origin: 0% 0% 0px;" data-font-name
="g_font_p0_75" data-canvas-width="109.5811223751068">dirigentes y afi liados.</
div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 1
48.578px; top: 1052.84px; transform: scale(0.940628, 1); transform-origin: 0% 0%
0px;" data-font-name="g_font_p0_75" data-canvas-width="298.1792064628602">8.3
Los sindicatos actan en defensa de sus dirigentes </div><div dir="ltr" style="fo
nt-size: 11.7333px; font-family: sans-serif; left: 175.6px; top: 1064.58px; tran
sform: scale(1.02471, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p
0_75" data-canvas-width="21.518933799743653">y afi</div><div dir="ltr" style="fo
nt-size: 11.7333px; font-family: sans-serif; left: 196.215px; top: 1064.58px; tr
ansform: scale(0.924978, 1); transform-origin: 0% 0% 0px;" data-font-name="g_fon
t_p0_75" data-canvas-width="221.99467147827164"> liados sin necesidad de poder e
special de </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-s
erif; left: 175.6px; top: 1076.31px; transform: scale(0.942038, 1); transform-or
igin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="245.872005329
13218">representacin; sin embargo, en la demanda o </div><div dir="ltr" style="fon
t-size: 11.7333px; font-family: sans-serif; left: 175.6px; top: 1088.04px; trans
form: scale(0.923427, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p
0_75" data-canvas-width="246.55488534393317">contestacin debe identifi carse indiv
idualmente </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-s
erif; left: 175.6px; top: 1099.78px; transform: scale(0.92692, 1); transform-ori
gin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="247.4876853641
5102">a cada uno de los afi liados con sus respectivas </div><div dir="ltr" styl
e="font-size: 11.7333px; font-family: sans-serif; left: 175.6px; top: 1111.51px;
transform: scale(0.941244, 1); transform-origin: 0% 0% 0px;" data-font-name="g_
font_p0_75" data-canvas-width="248.48853871917728">pretensiones. En este caso, e
l empleador debe </div><div dir="ltr" style="font-size: 11.7333px; font-family:
sans-serif; left: 175.6px; top: 1123.24px; transform: scale(0.942019, 1); transf
orm-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="237.388
80514526375">poner en conocimiento de los trabajadores la </div><div dir="ltr" s
tyle="font-size: 11.7333px; font-family: sans-serif; left: 175.6px; top: 1134.98
px; transform: scale(0.945087, 1); transform-origin: 0% 0% 0px;" data-font-name=
"g_font_p0_75" data-canvas-width="250.44800542831433">demanda interpuesta. La in
observancia de este </div><div dir="ltr" style="font-size: 11.7333px; font-famil
y: sans-serif; left: 175.6px; top: 1146.71px; transform: scale(0.95011, 1); tran
sform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="230.8
7680500411992">deber no afecta la prosecucin del proceso. </div><div dir="ltr" sty
le="font-size: 11.7333px; font-family: sans-serif; left: 499.885px; top: 161.11p
x; transform: scale(0.942908, 1); transform-origin: 0% 0% 0px;" data-font-name="
g_font_p0_75" data-canvas-width="234.78400508880623">La representacin del sindicat
o no habilita al </div><div dir="ltr" style="font-size: 11.7333px; font-family:
sans-serif; left: 499.885px; top: 172.844px; transform: scale(0.935831, 1); tran
sform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="251.7
3867212295548">cobro de los derechos econmicos que pudiese </div><div dir="ltr" st
yle="font-size: 11.7333px; font-family: sans-serif; left: 499.885px; top: 184.57
7px; transform: scale(0.934621, 1); transform-origin: 0% 0% 0px;" data-font-name
="g_font_p0_75" data-canvas-width="187.85888407173158">reconocerse a favor de lo
s afi liados.</div><div dir="ltr" style="font-size: 11.7333px; font-family: sans
-serif; left: 472.864px; top: 208.044px; transform: scale(1.0312, 1); transformorigin: 0% 0% 0px;" data-font-name="g_font_p0_1" data-canvas-width="190.77227080
154427">Artculo 9.- Legitimacin especial</div><div dir="ltr" style="font-size: 11.7333
px; font-family: sans-serif; left: 472.864px; top: 231.51px; transform: scale(0.
945253, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-can

vas-width="254.27307217788703">9.1 Las pretensiones derivadas de la afectacin </d


iv><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 49
9.885px; top: 243.244px; transform: scale(0.942805, 1); transform-origin: 0% 0%
0px;" data-font-name="g_font_p0_75" data-canvas-width="243.2437386054993">al der
echo a la no discriminacin en el acceso </div><div dir="ltr" style="font-size: 11.
7333px; font-family: sans-serif; left: 499.885px; top: 254.977px; transform: sca
le(0.940094, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" dat
a-canvas-width="208.70080452346804">al empleo o del quebrantamiento de las </div
><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 499.
885px; top: 266.71px; transform: scale(0.948423, 1); transform-origin: 0% 0% 0px
;" data-font-name="g_font_p0_75" data-canvas-width="258.9194722785951">prohibici
ones de trabajo forzoso e infantil pueden </div><div dir="ltr" style="font-size:
11.7333px; font-family: sans-serif; left: 499.885px; top: 278.444px; transform:
scale(0.941702, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75"
data-canvas-width="243.9008052864075">ser formuladas por los afectados directos
, una </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif;
left: 499.885px; top: 290.177px; transform: scale(0.943014, 1); transform-origi
n: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="262.157872348785
4">organizacin sindical, una asociacin o institucin </div><div dir="ltr" style="font-s
ize: 11.7333px; font-family: sans-serif; left: 499.885px; top: 301.91px; transfo
rm: scale(0.914462, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_
75" data-canvas-width="216.72757803077698">sin fi nes de lucro dedicada a la pro
teccin </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif;
left: 499.885px; top: 313.644px; transform: scale(0.942346, 1); transform-origin
: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="222.3936048202515
">de derechos fundamentales con solvencia </div><div dir="ltr" style="font-size:
11.7333px; font-family: sans-serif; left: 499.885px; top: 325.377px; transform:
scale(0.960936, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75"
data-canvas-width="235.4293384361268">para afrontar la defensa a criterio del j
uez, la </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-seri
f; left: 499.885px; top: 337.11px; transform: scale(0.950683, 1); transform-orig
in: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="236.72000513076
79">Defensora del Pueblo o el Ministerio Pblico.</div><div dir="ltr" style="font-siz
e: 11.7333px; font-family: sans-serif; left: 472.864px; top: 348.844px; transfor
m: scale(0.947577, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_7
5" data-canvas-width="252.05547212982182">9.2 Cuando se afecten los derechos de
libertad </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-se
rif; left: 499.885px; top: 360.577px; transform: scale(0.952315, 1); transform-o
rigin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="227.60320493
316655">sindical, negociacin colectiva, huelga, a la </div><div dir="ltr" style="f
ont-size: 11.7333px; font-family: sans-serif; left: 499.885px; top: 372.31px; tr
ansform: scale(0.957621, 1); transform-origin: 0% 0% 0px;" data-font-name="g_fon
t_p0_75" data-canvas-width="236.53227179336554">seguridad y salud en el trabajo
y, en general, </div><div dir="ltr" style="font-size: 11.7333px; font-family: sa
ns-serif; left: 499.885px; top: 384.044px; transform: scale(0.950487, 1); transf
orm-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="255.681
0722084046">cuando se afecte un derecho que corresponda a </div><div dir="ltr" s
tyle="font-size: 11.7333px; font-family: sans-serif; left: 499.885px; top: 395.7
77px; transform: scale(0.950997, 1); transform-origin: 0% 0% 0px;" data-font-nam
e="g_font_p0_75" data-canvas-width="261.5242723350525">un grupo o categora de pres
tadores de servicios, </div><div dir="ltr" style="font-size: 11.7333px; font-fam
ily: sans-serif; left: 499.885px; top: 407.51px; transform: scale(0.935272, 1);
transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="2
19.78880476379393">pueden ser demandantes el sindicato, los </div><div dir="ltr"
style="font-size: 11.7333px; font-family: sans-serif; left: 499.885px; top: 419
.244px; transform: scale(0.9412, 1); transform-origin: 0% 0% 0px;" data-font-nam
e="g_font_p0_75" data-canvas-width="248.47680538558967">representantes de los tr
abajadores, o cualquier </div><div dir="ltr" style="font-size: 11.7333px; font-f
amily: sans-serif; left: 499.885px; top: 430.977px; transform: scale(0.946213, 1
); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width

="241.28427189636236">trabajador o prestador de servicios del mbito.</div><div dir


="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 472.864px; to
p: 454.444px; transform: scale(1.02989, 1); transform-origin: 0% 0% 0px;" data-f
ont-name="g_font_p0_1" data-canvas-width="292.4885396728516">Artculo 10.- Defensa pbli
ca a cargo del Ministerio </div><div dir="ltr" style="font-size: 11.7333px; font
-family: sans-serif; left: 454.161px; top: 466.177px; transform: scale(1.02796,
1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_1" data-canvas-width
="60.6496013145447">de Justicia</div><div dir="ltr" style="font-size: 11.7333px;
font-family: sans-serif; left: 472.864px; top: 477.91px; transform: scale(0.951
407, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas
-width="288.2762729148866">La madre gestante, el menor de edad y la persona con
</div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left:
454.161px; top: 489.644px; transform: scale(0.945207, 1); transform-origin: 0%
0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="288.28800624847423">di
scapacidad que trabajan tienen derecho a la defensa </div><div dir="ltr" style="
font-size: 11.7333px; font-family: sans-serif; left: 454.161px; top: 501.377px;
transform: scale(0.953581, 1); transform-origin: 0% 0% 0px;" data-font-name="g_f
ont_p0_75" data-canvas-width="214.55573798370366">pblica, regulada por la ley de l
a materia.</div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-se
rif; left: 567.329px; top: 524.844px; transform: scale(1.0284, 1); transform-ori
gin: 0% 0% 0px;" data-font-name="g_font_p0_1" data-canvas-width="73.016534915924
1">CAP TULO III</div><div dir="ltr" style="font-size: 11.7333px; font-family: sansserif; left: 518.753px; top: 536.577px; transform: scale(1.00678, 1); transformorigin: 0% 0% 0px;" data-font-name="g_font_p0_1" data-canvas-width="170.14507035
446167">ACTUACIONES PROCESALES</div><div dir="ltr" style="font-size: 11.7333px;
font-family: sans-serif; left: 567px; top: 560.044px; transform: scale(1.03766,
1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_1" data-canvas-width
="73.67360159683227">Subcaptulo I</div><div dir="ltr" style="font-size: 11.7333px;
font-family: sans-serif; left: 519.069px; top: 571.777px; transform: scale(1.02
129, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_1" data-canvaswidth="169.53493700790406">Reglas de conducta y oralidad</div><div dir="ltr" sty
le="font-size: 11.7333px; font-family: sans-serif; left: 472.875px; top: 595.244
px; transform: scale(1.06633, 1); transform-origin: 0% 0% 0px;" data-font-name="
g_font_p0_1" data-canvas-width="71.44426821517946">Artculo 11.-</div><div dir="ltr"
style="font-size: 11.7333px; font-family: sans-serif; left: 554.078px; top: 595.
244px; transform: scale(1.08729, 1); transform-origin: 0% 0% 0px;" data-font-nam
e="g_font_p0_75" data-canvas-width="3.261866737365723"> </div><div dir="ltr" sty
le="font-size: 11.7333px; font-family: sans-serif; left: 567.093px; top: 595.244
px; transform: scale(1.00422, 1); transform-origin: 0% 0% 0px;" data-font-name="
g_font_p0_1" data-canvas-width="150.6325365982056">Reglas de conducta en las </d
iv><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 45
4.159px; top: 606.977px; transform: scale(0.994256, 1); transform-origin: 0% 0%
0px;" data-font-name="g_font_p0_1" data-canvas-width="60.64960131454468">audienc
ias</div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; le
ft: 472.862px; top: 618.71px; transform: scale(0.940079, 1); transform-origin: 0
% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="281.08373942565925">
En las audiencias el juez cuida especialmente que se </div><div dir="ltr" style=
"font-size: 11.7333px; font-family: sans-serif; left: 454.159px; top: 630.444px;
transform: scale(0.939343, 1); transform-origin: 0% 0% 0px;" data-font-name="g_
font_p0_75" data-canvas-width="228.26027161407475">observen las siguientes regla
s de conducta:</div><div dir="ltr" style="font-size: 11.7333px; font-family: san
s-serif; left: 472.862px; top: 653.91px; transform: scale(0.955802, 1); transfor
m-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="265.71307
24258424">a)
Respeto hacia el rgano jurisdiccional y hacia </div><div dir="ltr"
style="font-size: 11.7333px; font-family: sans-serif; left: 499.884px; top: 665
.644px; transform: scale(0.946537, 1); transform-origin: 0% 0% 0px;" data-font-n
ame="g_font_p0_75" data-canvas-width="232.84800504684452">toda persona presente
en la audiencia. Est </div><div dir="ltr" style="font-size: 11.7333px; font-family
: sans-serif; left: 499.884px; top: 677.377px; transform: scale(0.946254, 1); tr
ansform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="251

.70347212219244">prohibido agraviar, interrumpir mientras se hace </div><div dir


="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 499.884px; to
p: 689.11px; transform: scale(0.942031, 1); transform-origin: 0% 0% 0px;" data-f
ont-name="g_font_p0_75" data-canvas-width="262.82667236328126">uso de la palabra
, usar telfonos celulares u otros </div><div dir="ltr" style="font-size: 11.7333px
; font-family: sans-serif; left: 499.884px; top: 700.844px; transform: scale(0.9
48882, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canv
as-width="241.96480524444587">anlogos sin autorizacin del juez, abandonar </div><div
dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 499.884px
; top: 712.577px; transform: scale(0.929803, 1); transform-origin: 0% 0% 0px;" d
ata-font-name="g_font_p0_75" data-canvas-width="258.4853389358521">injustifi cad
amente la sala de audiencia, as como </div><div dir="ltr" style="font-size: 11.733
3px; font-family: sans-serif; left: 499.884px; top: 724.31px; transform: scale(0
.945772, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-ca
nvas-width="237.38880514526372">cualquier expresin de aprobacin o censura.</div><div
dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 472.862px
; top: 736.044px; transform: scale(0.954754, 1); transform-origin: 0% 0% 0px;" d
ata-font-name="g_font_p0_75" data-canvas-width="244.41707196426404">b) Colabor
acin en la labor de imparticin de </div><div dir="ltr" style="font-size: 11.7333px;
font-family: sans-serif; left: 499.884px; top: 747.777px; transform: scale(0.943
917, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas
-width="242.58667192459112">justicia. Merece sancin alegar hechos falsos, </div><d
iv dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 499.884
px; top: 759.51px; transform: scale(0.942985, 1); transform-origin: 0% 0% 0px;"
data-font-name="g_font_p0_75" data-canvas-width="253.66293883132934">ofrecer med
ios probatorios inexistentes, obstruir </div><div dir="ltr" style="font-size: 11
.7333px; font-family: sans-serif; left: 499.884px; top: 771.244px; transform: sc
ale(0.9412, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data
-canvas-width="248.47680538558976">la actuacin de las pruebas, generar dilaciones
</div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left:
499.884px; top: 782.977px; transform: scale(0.923079, 1); transform-origin: 0%
0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="252.92373881530767">qu
e provoquen injustifi cadamente la suspensin </div><div dir="ltr" style="font-size
: 11.7333px; font-family: sans-serif; left: 499.884px; top: 794.71px; transform:
scale(0.93972, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75"
data-canvas-width="230.23147165679939">de la audiencia, o desobedecer las rdenes <
/div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left:
499.884px; top: 806.444px; transform: scale(0.941411, 1); transform-origin: 0% 0
% 0px;" data-font-name="g_font_p0_75" data-canvas-width="116.73493586349491">dis
puestas por el juez.</div><div dir="ltr" style="font-size: 11.7333px; font-famil
y: sans-serif; left: 472.862px; top: 829.91px; transform: scale(1.02734, 1); tra
nsform-origin: 0% 0% 0px;" data-font-name="g_font_p0_1" data-canvas-width="259.9
16805633545">Artculo 12.- Prevalencia de la oralidad en los </div><div dir="ltr" sty
le="font-size: 11.7333px; font-family: sans-serif; left: 454.159px; top: 841.644
px; transform: scale(1.00907, 1); transform-origin: 0% 0% 0px;" data-font-name="
g_font_p0_1" data-canvas-width="138.24213632965092">procesos por audiencias</div
><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 472.
862px; top: 865.11px; transform: scale(0.90309, 1); transform-origin: 0% 0% 0px;
" data-font-name="g_font_p0_75" data-canvas-width="252.86507214736932">12.1 En l
os procesos laborales por audiencias las </div><div dir="ltr" style="font-size:
11.7333px; font-family: sans-serif; left: 499.884px; top: 876.844px; transform:
scale(0.916206, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75"
data-canvas-width="256.5376055603027">exposiciones orales de las partes y sus ab
ogados </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif
; left: 499.884px; top: 888.577px; transform: scale(0.916703, 1); transform-orig
in: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="257.59360558319
094">prevalecen sobre las escritas sobre la base de las </div><div dir="ltr" sty
le="font-size: 11.7333px; font-family: sans-serif; left: 499.884px; top: 900.31p
x; transform: scale(0.916782, 1); transform-origin: 0% 0% 0px;" data-font-name="
g_font_p0_75" data-canvas-width="244.7808053054809">cuales el juez dirige las ac

tuaciones procesales </div><div dir="ltr" style="font-size: 11.7333px; font-fami


ly: sans-serif; left: 499.884px; top: 912.044px; transform: scale(0.922447, 1);
transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="2
19.54240475845336">y pronuncia sentencia. Las audiencias son </div><div dir="ltr
" style="font-size: 11.7333px; font-family: sans-serif; left: 499.884px; top: 92
3.777px; transform: scale(0.915291, 1); transform-origin: 0% 0% 0px;" data-fontname="g_font_p0_75" data-canvas-width="236.14507178497308">sustancialmente un de
bate oral de posiciones </div><div dir="ltr" style="font-size: 11.7333px; font-f
amily: sans-serif; left: 499.884px; top: 935.51px; transform: scale(0.924229, 1)
; transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width=
"260.63253898239134">presididas por el juez, quien puede interrogar a las </div>
<div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 499.8
84px; top: 947.244px; transform: scale(0.924985, 1); transform-origin: 0% 0% 0px
;" data-font-name="g_font_p0_75" data-canvas-width="250.6709387664795">partes, s
us abogados y terceros participantes en </div><div dir="ltr" style="font-size: 1
1.7333px; font-family: sans-serif; left: 499.884px; top: 958.977px; transform: s
cale(0.920561, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" d
ata-canvas-width="245.78987199401848">cualquier momento. Las actuaciones realiza
das </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; l
eft: 499.884px; top: 970.71px; transform: scale(0.927634, 1); transform-origin:
0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="248.60587205505365"
>en audiencia, salvo la etapa de conciliacin, son </div><div dir="ltr" style="font
-size: 11.7333px; font-family: sans-serif; left: 499.884px; top: 982.444px; tran
sform: scale(0.934564, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_
p0_75" data-canvas-width="248.59413872146604">registradas en audio y vdeo utilizan
do cualquier </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans
-serif; left: 499.884px; top: 994.177px; transform: scale(0.932532, 1); transfor
m-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="183.70880
398178102">medio apto que permita garantizar fi</div><div dir="ltr" style="fontsize: 11.7333px; font-family: sans-serif; left: 710.333px; top: 994.177px; trans
form: scale(0.931157, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p
0_75" data-canvas-width="46.55786767578125"> delidad, </div><div dir="ltr" style
="font-size: 11.7333px; font-family: sans-serif; left: 499.884px; top: 1005.91px
; transform: scale(0.93593, 1); transform-origin: 0% 0% 0px;" data-font-name="g_
font_p0_75" data-canvas-width="236.7904051322937">conservacin y reproduccin de su co
ntenido. </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-ser
if; left: 499.884px; top: 1017.64px; transform: scale(0.925333, 1); transform-or
igin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="244.288005294
79977">Las partes tienen derecho a la obtencin de las </div><div dir="ltr" style="
font-size: 11.7333px; font-family: sans-serif; left: 499.884px; top: 1029.38px;
transform: scale(0.925854, 1); transform-origin: 0% 0% 0px;" data-font-name="g_f
ont_p0_75" data-canvas-width="241.64800523757933">respectivas copias en soporte
electrnico, a su </div><div dir="ltr" style="font-size: 11.7333px; font-family: sa
ns-serif; left: 499.884px; top: 1041.11px; transform: scale(0.927289, 1); transf
orm-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="30.6005
33996582026">costo.</div><div dir="ltr" style="font-size: 11.7333px; font-family
: sans-serif; left: 472.862px; top: 1052.84px; transform: scale(0.924614, 1); tr
ansform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="233
.92747173690796">12.2 La grabacin se incorpora al expediente. </div><div dir="ltr"
style="font-size: 11.7333px; font-family: sans-serif; left: 499.884px; top: 106
4.58px; transform: scale(0.955864, 1); transform-origin: 0% 0% 0px;" data-font-n
ame="g_font_p0_75" data-canvas-width="250.4362720947266">Adicionalmente, el juez
deja constancia en acta </div><div dir="ltr" style="font-size: 11.7333px; fontfamily: sans-serif; left: 499.884px; top: 1076.31px; transform: scale(0.915256,
1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-widt
h="228.81408495941162">nicamente de lo siguiente: identifi cacin de </div><div dir="
ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 499.884px; top:
1088.04px; transform: scale(0.940003, 1); transform-origin: 0% 0% 0px;" data-fo
nt-name="g_font_p0_75" data-canvas-width="264.1408057250978">todas las personas
que participan en la audiencia, </div><div dir="ltr" style="font-size: 11.7333px

; font-family: sans-serif; left: 499.884px; top: 1099.78px; transform: scale(0.9


30155, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canv
as-width="226.95787158584602">de los medios probatorios que se hubiesen </div><d
iv dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 499.884
px; top: 1111.51px; transform: scale(0.94396, 1); transform-origin: 0% 0% 0px;"
data-font-name="g_font_p0_75" data-canvas-width="251.09333877563483">admitido y
actuado, la resolucin que suspende </div><div dir="ltr" style="font-size: 11.7333p
x; font-family: sans-serif; left: 499.884px; top: 1123.24px; transform: scale(0.
949222, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-can
vas-width="245.84853866195687">la audiencia, los incidentes extraordinarios y el
</div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left
: 499.884px; top: 1134.98px; transform: scale(0.944857, 1); transform-origin: 0%
0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="239.9936052017212">fa
llo de la sentencia o la decisin de diferir su </div><div dir="ltr" style="font-si
ze: 11.7333px; font-family: sans-serif; left: 499.884px; top: 1146.71px; transfo
rm: scale(0.957213, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_
75" data-canvas-width="59.347201286315915">expedicin.</div></div></div><a name="4"
></a><div data-loaded="true" style="width: 872px; height: 1234px;" class="page"
id="pageContainer4"><canvas height="1234" width="872" moz-opaque="" id="page4"><
/canvas><div class="textLayer"><div dir="ltr" style="font-size: 16.1333px; fontfamily: sans-serif; left: 353.77px; top: 132.155px; transform: scale(1.02371, 1)
; transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_1" data-canvas-width="
152.37933213233944">NORMAS LEGALES</div><div dir="ltr" style="font-size: 8.8px;
font-family: sans-serif; left: 707.096px; top: 129.435px; transform: scale(0.767
947, 1); transform-origin: 0% 0% 0px;" data-font-name="Helvetica" data-canvas-wi
dth="34.55760074901581">El Peruano</div><div dir="ltr" style="font-size: 8.8px;
font-family: sans-serif; left: 631.416px; top: 141.438px; transform: scale(0.770
583, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_3" data-canvaswidth="111.73448242177966">Lima, viernes 15 de enero de 2010</div><div dir="ltr"
style="font-size: 14.6667px; font-family: sans-serif; left: 119.487px; top: 133
.172px; transform: scale(1.04102, 1); transform-origin: 0% 0% 0px;" data-font-na
me="g_font_p0_1" data-canvas-width="48.92800106048585">411216</div><div dir="ltr
" style="font-size: 11.7333px; font-family: sans-serif; left: 138.195px; top: 16
1.11px; transform: scale(0.9462, 1); transform-origin: 0% 0% 0px;" data-font-nam
e="g_font_p0_75" data-canvas-width="256.42027222442636">
Si no se dispusie
se de medios de grabacin </div><div dir="ltr" style="font-size: 11.7333px; font-fa
mily: sans-serif; left: 165.217px; top: 172.844px; transform: scale(0.940734, 1)
; transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width=
"229.53920497512829">electrnicos, el registro de las exposiciones </div><div dir="
ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 165.217px; top:
184.577px; transform: scale(0.951156, 1); transform-origin: 0% 0% 0px;" data-fo
nt-name="g_font_p0_75" data-canvas-width="251.1050721092225">orales se efecta haci
endo constar, en acta, las </div><div dir="ltr" style="font-size: 11.7333px; fon
t-family: sans-serif; left: 165.217px; top: 196.31px; transform: scale(0.938587,
1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-wid
th="138.91093634414676">ideas centrales expuestas.</div><div dir="ltr" style="fo
nt-size: 11.7333px; font-family: sans-serif; left: 230.689px; top: 219.777px; tr
ansform: scale(1.03967, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font
_p0_1" data-canvas-width="76.935468334198">Subcaptulo II</div><div dir="ltr" style
="font-size: 11.7333px; font-family: sans-serif; left: 229.047px; top: 231.51px;
transform: scale(1.07067, 1); transform-origin: 0% 0% 0px;" data-font-name="g_f
ont_p0_1" data-canvas-width="29.978667316436763">Notifi</div><div dir="ltr" styl
e="font-size: 11.7333px; font-family: sans-serif; left: 255.435px; top: 231.51px
; transform: scale(1.00907, 1); transform-origin: 0% 0% 0px;" data-font-name="g_
font_p0_1" data-canvas-width="53.48053449249267"> caciones</div><div dir="ltr" s
tyle="font-size: 11.7333px; font-family: sans-serif; left: 138.184px; top: 254.9
77px; transform: scale(1.06394, 1); transform-origin: 0% 0% 0px;" data-font-name
="g_font_p0_1" data-canvas-width="105.33013561630251">Artculo 13.- Notifi</div><div
dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 252.924px;
top: 254.977px; transform: scale(0.967366, 1); transform-origin: 0% 0% 0px;" da

ta-font-name="g_font_p0_1" data-canvas-width="143.17013643646246"> caciones en l


os procesos </div><div dir="ltr" style="font-size: 11.7333px; font-family: sansserif; left: 119.481px; top: 266.71px; transform: scale(0.99079, 1); transform-o
rigin: 0% 0% 0px;" data-font-name="g_font_p0_1" data-canvas-width="51.5210677833
5571">laborales</div><div dir="ltr" style="font-size: 11.7333px; font-family: sa
ns-serif; left: 138.184px; top: 278.444px; transform: scale(0.892567, 1); transf
orm-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="231.174
8316772461">Las notifi caciones de las resoluciones que se </div><div dir="ltr"
style="font-size: 11.7333px; font-family: sans-serif; left: 119.481px; top: 290.
177px; transform: scale(0.940152, 1); transform-origin: 0% 0% 0px;" data-font-na
me="g_font_p0_75" data-canvas-width="289.56693960952765">dicten en el proceso se
efectan mediante sistemas de </div><div dir="ltr" style="font-size: 11.7333px; fo
nt-family: sans-serif; left: 119.481px; top: 301.91px; transform: scale(0.942837
, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-wi
dth="313.02187345123303">comunicacin electrnicos u otro medio idneo que permita </div>
<div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 119.4
81px; top: 313.644px; transform: scale(0.939212, 1); transform-origin: 0% 0% 0px
;" data-font-name="g_font_p0_75" data-canvas-width="303.36533990859994">confi rm
ar fehacientemente su recepcin, salvo cuando se </div><div dir="ltr" style="font-s
ize: 11.7333px; font-family: sans-serif; left: 119.481px; top: 325.377px; transf
orm: scale(0.943756, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0
_75" data-canvas-width="285.01440617752087">trate de las resoluciones que conten
gan el traslado de </div><div dir="ltr" style="font-size: 11.7333px; font-family
: sans-serif; left: 119.481px; top: 337.11px; transform: scale(0.946297, 1); tra
nsform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="289.
5669396095276">la demanda, la admisin de un tercero con inters, una </div><div dir="
ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 119.481px; top:
348.844px; transform: scale(0.940871, 1); transform-origin: 0% 0% 0px;" data-fo
nt-name="g_font_p0_75" data-canvas-width="295.43360640335084">medida cautelar, l
a sentencia en los procesos diferentes </div><div dir="ltr" style="font-size: 11
.7333px; font-family: sans-serif; left: 119.481px; top: 360.577px; transform: sc
ale(0.949446, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" da
ta-canvas-width="268.6933391571046">al ordinario, abreviado y de impugnacin de lau
dos </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; l
eft: 119.481px; top: 372.31px; transform: scale(0.927839, 1); transform-origin:
0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="300.6197398490907">
arbitrales econmicos. Las resoluciones mencionadas se </div><div dir="ltr" style="
font-size: 11.7333px; font-family: sans-serif; left: 119.481px; top: 384.044px;
transform: scale(0.927253, 1); transform-origin: 0% 0% 0px;" data-font-name="g_f
ont_p0_75" data-canvas-width="136.3061362876892">notifi can mediante cdula.</div><
div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 138.18
4px; top: 395.777px; transform: scale(0.939505, 1); transform-origin: 0% 0% 0px;
" data-font-name="g_font_p0_75" data-canvas-width="276.214405986786">Para efecto
s de la notifi cacin electrnica, las partes </div><div dir="ltr" style="font-size: 1
1.7333px; font-family: sans-serif; left: 119.469px; top: 407.51px; transform: sc
ale(0.943026, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" da
ta-canvas-width="304.59733993530284">deben consignar en la demanda o en su conte
stacin una </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-ser
if; left: 119.469px; top: 419.244px; transform: scale(0.944842, 1); transform-or
igin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="305.184006614
6852">direccin electrnica, bajo apercibimiento de declararse la </div><div dir="ltr"
style="font-size: 11.7333px; font-family: sans-serif; left: 119.469px; top: 430
.977px; transform: scale(0.928527, 1); transform-origin: 0% 0% 0px;" data-font-n
ame="g_font_p0_75" data-canvas-width="225.63200489044186">inadmisibilidad de tal
es actos postulatorios.</div><div dir="ltr" style="font-size: 11.7333px; font-fa
mily: sans-serif; left: 138.172px; top: 442.71px; transform: scale(0.93769, 1);
transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="2
74.7430459548951">La notifi cacin electrnica surte efectos desde el da </div><div dir=
"ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 119.469px; top
: 454.444px; transform: scale(0.945222, 1); transform-origin: 0% 0% 0px;" data-f

ont-name="g_font_p0_75" data-canvas-width="233.46987172698974">siguiente que lle


ga a la direccin electrnica.</div><div dir="ltr" style="font-size: 11.7333px; font-f
amily: sans-serif; left: 138.172px; top: 466.177px; transform: scale(0.948238, 1
); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width
="277.8336060218811">En las zonas de pobreza decretadas por los rganos </div><div
dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 119.469px;
top: 477.91px; transform: scale(0.942455, 1); transform-origin: 0% 0% 0px;" dat
a-font-name="g_font_p0_75" data-canvas-width="300.643206516266">de gobierno del
Poder Judicial, as como en los procesos </div><div dir="ltr" style="font-size: 11.
7333px; font-family: sans-serif; left: 119.469px; top: 489.644px; transform: sca
le(0.949932, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" dat
a-canvas-width="262.1813390159608">cuya cuanta no supere las setenta (70) Unidades
</div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left
: 119.469px; top: 501.377px; transform: scale(0.939604, 1); transform-origin: 0%
0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="270.60587253189095">d
e Referencia Procesal (URP) las resoluciones son </div><div dir="ltr" style="fon
t-size: 11.7333px; font-family: sans-serif; left: 119.469px; top: 513.11px; tran
sform: scale(0.93073, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p
0_75" data-canvas-width="303.4181399097443">notifi cadas por cdula, salvo que se s
olicite la notifi cacin </div><div dir="ltr" style="font-size: 11.7333px; font-fam
ily: sans-serif; left: 119.469px; top: 524.844px; transform: scale(0.940984, 1);
transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="
304.87893994140626">electrnica. Las notifi caciones por cdula fuera del distrito </d
iv><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 11
9.469px; top: 536.577px; transform: scale(0.940797, 1); transform-origin: 0% 0%
0px;" data-font-name="g_font_p0_75" data-canvas-width="295.41013973617567">judic
ial son realizadas directamente a la sede judicial de </div><div dir="ltr" style
="font-size: 11.7333px; font-family: sans-serif; left: 119.469px; top: 548.31px;
transform: scale(0.933867, 1); transform-origin: 0% 0% 0px;" data-font-name="g_
font_p0_75" data-canvas-width="41.090134223937994">destino.</div><div dir="ltr"
style="font-size: 11.7333px; font-family: sans-serif; left: 138.172px; top: 560.
044px; transform: scale(0.934532, 1); transform-origin: 0% 0% 0px;" data-font-na
me="g_font_p0_75" data-canvas-width="278.4906727027894">Las resoluciones dictada
s en audiencia se entienden </div><div dir="ltr" style="font-size: 11.7333px; fo
nt-family: sans-serif; left: 119.469px; top: 571.777px; transform: scale(0.93605
3, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-w
idth="180.65813724899297">notifi cadas a las partes, en el acto.</div><div dir="
ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 229.047px; top:
595.244px; transform: scale(1.04152, 1); transform-origin: 0% 0% 0px;" data-fon
t-name="g_font_p0_1" data-canvas-width="80.19733507156373">Subcaptulo III</div><di
v dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 224.142p
x; top: 606.977px; transform: scale(1.02253, 1); transform-origin: 0% 0% 0px;" d
ata-font-name="g_font_p0_1" data-canvas-width="89.98293528366088">Costas y costo
s</div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left
: 138.172px; top: 630.444px; transform: scale(1.03984, 1); transform-origin: 0%
0% 0px;" data-font-name="g_font_p0_1" data-canvas-width="165.33440358352667">Artcu
lo 14.- Costas y costos</div><div dir="ltr" style="font-size: 11.7333px; font-fami
ly: sans-serif; left: 138.172px; top: 642.177px; transform: scale(0.947166, 1);
transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="2
68.048005809784">La condena en costas y costos se regula conforme </div><div dir
="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 119.469px; to
p: 653.91px; transform: scale(0.958182, 1); transform-origin: 0% 0% 0px;" data-f
ont-name="g_font_p0_75" data-canvas-width="281.70560610580446">a la norma proces
al civil. El juez exonera al prestador </div><div dir="ltr" style="font-size: 11
.7333px; font-family: sans-serif; left: 119.469px; top: 665.644px; transform: sc
ale(0.937837, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" da
ta-canvas-width="265.40800575256355">de servicios de costas y costos si las pret
ensiones </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-ser
if; left: 119.469px; top: 677.377px; transform: scale(0.936659, 1); transform-or
igin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="279.124272716

52234">reclamadas no superan las setenta (70) Unidades de </div><div dir="ltr" s


tyle="font-size: 11.7333px; font-family: sans-serif; left: 119.469px; top: 689.1
1px; transform: scale(0.951252, 1); transform-origin: 0% 0% 0px;" data-font-name
="g_font_p0_75" data-canvas-width="288.22933958053596">Referencia Procesal (URP)
, salvo que la parte hubiese </div><div dir="ltr" style="font-size: 11.7333px; f
ont-family: sans-serif; left: 119.469px; top: 700.844px; transform: scale(0.9534
42, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvaswidth="308.9152066955568">obrado con temeridad o mala fe. Tambin hay exoneracin </di
v><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 119
.469px; top: 712.577px; transform: scale(0.950138, 1); transform-origin: 0% 0% 0
px;" data-font-name="g_font_p0_75" data-canvas-width="297.39307311248785">si, en
cualquier tipo de pretensin, el juez determina que </div><div dir="ltr" style="fo
nt-size: 11.7333px; font-family: sans-serif; left: 119.469px; top: 724.31px; tra
nsform: scale(0.946798, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font
_p0_75" data-canvas-width="215.86987134552007">hubo motivos razonables para dema
ndar.</div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif;
left: 228.401px; top: 747.777px; transform: scale(1.04487, 1); transform-origin:
0% 0% 0px;" data-font-name="g_font_p0_1" data-canvas-width="81.49973509979247">
Subcaptulo IV</div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-s
erif; left: 250.566px; top: 759.51px; transform: scale(1.03221, 1); transform-or
igin: 0% 0% 0px;" data-font-name="g_font_p0_1" data-canvas-width="37.15946747207
642">Multas</div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-s
erif; left: 138.184px; top: 782.977px; transform: scale(1.0515, 1); transform-or
igin: 0% 0% 0px;" data-font-name="g_font_p0_1" data-canvas-width="112.5109357719
4216">Artculo 15.- Multas</div><div dir="ltr" style="font-size: 11.7333px; font-fami
ly: sans-serif; left: 138.184px; top: 794.71px; transform: scale(0.944932, 1); t
ransform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="27
7.8101393547059">En los casos de temeridad o mala fe procesal el juez </div><div
dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 119.481px
; top: 806.444px; transform: scale(0.94025, 1); transform-origin: 0% 0% 0px;" da
ta-font-name="g_font_p0_75" data-canvas-width="306.5216066436768">tiene el deber
de imponer a las partes, sus representantes </div><div dir="ltr" style="font-si
ze: 11.7333px; font-family: sans-serif; left: 119.481px; top: 818.177px; transfo
rm: scale(0.94641, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_7
5" data-canvas-width="281.08373942565925">y los abogados una multa no menor de m
edia (1/2) ni </div><div dir="ltr" style="font-size: 11.7333px; font-family: san
s-serif; left: 119.481px; top: 829.91px; transform: scale(0.950002, 1); transfor
m-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="307.80054
000473035">mayor de cincuenta (50) Unidades de Referencia Procesal </div><div di
r="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 119.481px; t
op: 841.644px; transform: scale(0.968793, 1); transform-origin: 0% 0% 0px;" data
-font-name="g_font_p0_75" data-canvas-width="35.84533411026001">(URP).</div><div
dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 138.184px
; top: 853.377px; transform: scale(0.984319, 1); transform-origin: 0% 0% 0px;" d
ata-font-name="g_font_p0_75" data-canvas-width="279.5466727256776">La multa por
temeridad o mala fe es independiente </div><div dir="ltr" style="font-size: 11.7
333px; font-family: sans-serif; left: 119.481px; top: 865.11px; transform: scale
(0.988068, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" datacanvas-width="286.53973954391495">de aquella otra que se pueda imponer por infra
ccin </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; le
ft: 119.481px; top: 876.844px; transform: scale(0.983673, 1); transform-origin:
0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="269.5264058418275">
a las reglas de conducta a ser observadas en las </div><div dir="ltr" style="fon
t-size: 11.7333px; font-family: sans-serif; left: 119.481px; top: 888.577px; tra
nsform: scale(0.967633, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font
_p0_75" data-canvas-width="61.92853467559815">audiencias.</div><div dir="ltr" st
yle="font-size: 11.7333px; font-family: sans-serif; left: 138.184px; top: 900.31
px; transform: scale(0.947031, 1); transform-origin: 0% 0% 0px;" data-font-name=
"g_font_p0_75" data-canvas-width="286.9504062194825">La multa por infraccin a las
reglas de conducta en las </div><div dir="ltr" style="font-size: 11.7333px; font

-family: sans-serif; left: 119.481px; top: 912.044px; transform: scale(0.946501,


1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-wid
th="301.93387321090705">audiencias es no menor de media (1/2) ni mayor de cinco
</div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left:
119.481px; top: 923.777px; transform: scale(0.948669, 1); transform-origin: 0%
0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="231.47520501708985">(5
) Unidades de Referencia Procesal (URP).</div><div dir="ltr" style="font-size: 1
1.7333px; font-family: sans-serif; left: 138.184px; top: 935.51px; transform: sc
ale(0.940816, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" da
ta-canvas-width="246.49387200927737">Adicionalmente a las multas impuestas, el j
uez </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; l
eft: 119.481px; top: 947.244px; transform: scale(0.942898, 1); transform-origin:
0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="287.5840062332154"
>debe remitir copias de las actuaciones respectivas a la </div><div dir="ltr" st
yle="font-size: 11.7333px; font-family: sans-serif; left: 119.481px; top: 958.97
7px; transform: scale(0.954186, 1); transform-origin: 0% 0% 0px;" data-font-name
="g_font_p0_75" data-canvas-width="298.6602731399537">presidencia de la corte su
perior, al Ministerio Pblico y al </div><div dir="ltr" style="font-size: 11.7333px
; font-family: sans-serif; left: 119.481px; top: 970.71px; transform: scale(0.93
7411, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canva
s-width="306.5333399772645">Colegio de Abogados correspondiente, para las sancio
nes </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; l
eft: 119.481px; top: 982.444px; transform: scale(0.951215, 1); transform-origin:
0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="136.97493630218509
">a que pudiera haber lugar.</div><div dir="ltr" style="font-size: 11.7333px; fo
nt-family: sans-serif; left: 138.184px; top: 994.177px; transform: scale(0.93410
8, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-w
idth="276.4960059928894">Existe responsabilidad solidaria entre las partes, sus
</div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left:
119.481px; top: 1005.91px; transform: scale(0.931634, 1); transform-origin: 0%
0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="299.98613983535773">re
presentantes y sus abogados por las multas impuestas </div><div dir="ltr" style=
"font-size: 11.7333px; font-family: sans-serif; left: 119.481px; top: 1017.64px;
transform: scale(0.940622, 1); transform-origin: 0% 0% 0px;" data-font-name="g_
font_p0_75" data-canvas-width="293.47413969421405">a cualquiera de ellos. No se
extiende la responsabilidad </div><div dir="ltr" style="font-size: 11.7333px; fo
nt-family: sans-serif; left: 119.481px; top: 1029.38px; transform: scale(0.93841
8, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-w
idth="177.36107051086427">solidaria al prestador de servicios.</div><div dir="lt
r" style="font-size: 11.7333px; font-family: sans-serif; left: 138.184px; top: 1
041.11px; transform: scale(0.953147, 1); transform-origin: 0% 0% 0px;" data-font
-name="g_font_p0_75" data-canvas-width="284.9909395103456">El juez slo puede exone
rar de la multa por temeridad </div><div dir="ltr" style="font-size: 11.7333px;
font-family: sans-serif; left: 119.481px; top: 1052.84px; transform: scale(0.946
577, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas
-width="293.4389396934511">o mala fe si el proceso concluye por conciliacin judici
al </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; le
ft: 119.481px; top: 1064.58px; transform: scale(0.940079, 1); transform-origin:
0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="304.58560660171526"
>antes de la sentencia de segunda instancia, en resolucin </div><div dir="ltr" sty
le="font-size: 11.7333px; font-family: sans-serif; left: 119.481px; top: 1076.31
px; transform: scale(0.959698, 1); transform-origin: 0% 0% 0px;" data-font-name=
"g_font_p0_75" data-canvas-width="50.86400110244752">motivada.</div><div dir="lt
r" style="font-size: 11.7333px; font-family: sans-serif; left: 138.184px; top: 1
088.04px; transform: scale(0.988463, 1); transform-origin: 0% 0% 0px;" data-font
-name="g_font_p0_75" data-canvas-width="287.6426729011537">El juez puede imponer
multa a los testigos o peritos, </div><div dir="ltr" style="font-size: 11.7333p
x; font-family: sans-serif; left: 119.481px; top: 1099.78px; transform: scale(0.
990511, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-can
vas-width="310.02987338638326">no menor de media (1/2) ni mayor de cinco (5) Uni

dades </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif;


left: 119.481px; top: 1111.51px; transform: scale(0.986446, 1); transform-origi
n: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="300.866139854431
2">de Referencia Procesal (URP) cuando stos, habiendo </div><div dir="ltr" style="
font-size: 11.7333px; font-family: sans-serif; left: 119.481px; top: 1123.24px;
transform: scale(0.959021, 1); transform-origin: 0% 0% 0px;" data-font-name="g_f
ont_p0_75" data-canvas-width="267.56693913269044">sido notifi cados excepcionalm
ente por el juzgado, </div><div dir="ltr" style="font-size: 11.7333px; font-fami
ly: sans-serif; left: 119.481px; top: 1134.98px; transform: scale(0.963039, 1);
transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="2
86.9856062202455">inasisten sin justifi cacin a la audiencia ordenada de </div><di
v dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 119.481p
x; top: 1146.71px; transform: scale(0.981481, 1); transform-origin: 0% 0% 0px;"
data-font-name="g_font_p0_75" data-canvas-width="92.25920199966433">ofi cio por
el juez.</div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-seri
f; left: 554.318px; top: 161.11px; transform: scale(1.04317, 1); transform-origi
n: 0% 0% 0px;" data-font-name="g_font_p0_1" data-canvas-width="78.23786836242675
">Subcaptulo V</div><div dir="ltr" style="font-size: 11.7333px; font-family: sansserif; left: 525.618px; top: 172.844px; transform: scale(1.03531, 1); transformorigin: 0% 0% 0px;" data-font-name="g_font_p0_1" data-canvas-width="135.62560293
960573">Admisin y procedencia</div><div dir="ltr" style="font-size: 11.7333px; fon
t-family: sans-serif; left: 462.47px; top: 196.31px; transform: scale(1.01431, 1
); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_1" data-canvas-width=
"220.10560477066053">Artculo 16.- Requisitos de la demanda</div><div dir="ltr" style
="font-size: 11.7333px; font-family: sans-serif; left: 462.47px; top: 208.044px;
transform: scale(0.95048, 1); transform-origin: 0% 0% 0px;" data-font-name="g_f
ont_p0_75" data-canvas-width="278.49067270278937">La demanda se presenta por esc
rito y debe contener </div><div dir="ltr" style="font-size: 11.7333px; font-fami
ly: sans-serif; left: 443.767px; top: 219.777px; transform: scale(0.938812, 1);
transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="3
03.23627323913576">los requisitos y anexos establecidos en la norma procesal </d
iv><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 44
3.767px; top: 231.51px; transform: scale(0.935289, 1); transform-origin: 0% 0% 0
px;" data-font-name="g_font_p0_75" data-canvas-width="185.1872040138245">civil,
con las siguientes precisiones:</div><div dir="ltr" style="font-size: 11.7333px;
font-family: sans-serif; left: 462.47px; top: 254.977px; transform: scale(0.954
761, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas
-width="290.24747295761125">a)
Debe incluirse, cuando corresponda, la indica
cin </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; lef
t: 489.492px; top: 266.71px; transform: scale(0.951804, 1); transform-origin: 0%
0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="246.5173386764527">de
l monto total del petitorio, as como el monto </div><div dir="ltr" style="font-siz
e: 11.7333px; font-family: sans-serif; left: 489.492px; top: 278.444px; transfor
m: scale(0.95059, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75
" data-canvas-width="234.79573842239387">de cada uno de los extremos que integre
n la </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif;
left: 489.492px; top: 290.177px; transform: scale(0.957917, 1); transform-origin
: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="61.3066679954529"
>demanda; y</div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-s
erif; left: 462.47px; top: 301.91px; transform: scale(0.944252, 1); transform-or
igin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="236.062938449
85967">b) no debe incluirse ningn pliego dirigido a </div><div dir="ltr" style="
font-size: 11.7333px; font-family: sans-serif; left: 489.492px; top: 313.644px;
transform: scale(0.943176, 1); transform-origin: 0% 0% 0px;" data-font-name="g_f
ont_p0_75" data-canvas-width="228.24853828048708">la contraparte, los testigos o
los peritos; sin </div><div dir="ltr" style="font-size: 11.7333px; font-family:
sans-serif; left: 489.492px; top: 325.377px; transform: scale(0.918882, 1); tra
nsform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="233.
39595172538756">embargo, debe indicarse la fi nalidad de cada </div><div dir="lt
r" style="font-size: 11.7333px; font-family: sans-serif; left: 489.492px; top: 3

37.11px; transform: scale(0.941328, 1); transform-origin: 0% 0% 0px;" data-fontname="g_font_p0_75" data-canvas-width="91.30880197906494">medio de prueba.</div>


<div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 462.4
7px; top: 360.577px; transform: scale(0.944131, 1); transform-origin: 0% 0% 0px;
" data-font-name="g_font_p0_75" data-canvas-width="261.52427233505256">El demand
ante puede incluir de modo expreso su </div><div dir="ltr" style="font-size: 11.
7333px; font-family: sans-serif; left: 443.767px; top: 372.31px; transform: scal
e(0.938019, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data
-canvas-width="288.90987292861945">pretensin de reconocimiento de los honorarios q
ue se </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif;
left: 443.767px; top: 384.044px; transform: scale(0.941267, 1); transform-origi
n: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="165.662936923980
77">pagan con ocasin del proceso.</div><div dir="ltr" style="font-size: 11.7333px;
font-family: sans-serif; left: 462.47px; top: 395.777px; transform: scale(0.939
729, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas
-width="238.69120517349248">Cuando el proceso es iniciado por ms de un </div><div
dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 443.767px;
top: 407.51px; transform: scale(0.936959, 1); transform-origin: 0% 0% 0px;" dat
a-font-name="g_font_p0_75" data-canvas-width="302.6378732261658">demandante debe
designarse a uno de ellos para que los </div><div dir="ltr" style="font-size: 1
1.7333px; font-family: sans-serif; left: 443.767px; top: 419.244px; transform: s
cale(0.939121, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" d
ata-canvas-width="266.71040578079226">represente y sealarse un domicilio procesal ni
co.</div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; le
ft: 462.47px; top: 430.977px; transform: scale(0.939344, 1); transform-origin: 0
% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="260.19840563964846">
Los prestadores de servicios pueden comparecer </div><div dir="ltr" style="fontsize: 11.7333px; font-family: sans-serif; left: 443.767px; top: 442.71px; transf
orm: scale(0.942857, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0
_75" data-canvas-width="277.2000060081483">al proceso sin necesidad de abogado c
uando el total </div><div dir="ltr" style="font-size: 11.7333px; font-family: sa
ns-serif; left: 443.767px; top: 454.444px; transform: scale(0.94439, 1); transfo
rm-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="309.7600
067138673">reclamado no supere las diez (10) Unidades de Referencia </div><div d
ir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 443.767px;
top: 466.177px; transform: scale(0.949083, 1); transform-origin: 0% 0% 0px;" dat
a-font-name="g_font_p0_75" data-canvas-width="287.5722728996277">Procesal (URP).
Cuando supere este lmite y hasta las </div><div dir="ltr" style="font-size: 11.73
33px; font-family: sans-serif; left: 443.767px; top: 477.91px; transform: scale(
0.94679, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-ca
nvas-width="295.3984064025879">setenta (70) Unidades de Referencia Procesal (URP
) es </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif;
left: 443.767px; top: 489.644px; transform: scale(0.949173, 1); transform-origin
: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="308.4810733528138
">facultad del juez, atendiendo a las circunstancias del caso, </div><div dir="l
tr" style="font-size: 11.7333px; font-family: sans-serif; left: 443.767px; top:
501.377px; transform: scale(0.948038, 1); transform-origin: 0% 0% 0px;" data-fon
t-name="g_font_p0_75" data-canvas-width="296.73600643157965">exigir o no la comp
arecencia con abogado. En los casos </div><div dir="ltr" style="font-size: 11.73
33px; font-family: sans-serif; left: 443.767px; top: 513.11px; transform: scale(
0.941113, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-c
anvas-width="288.92160626220715">en que se comparezca sin abogado debe emplearse
el </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; l
eft: 443.767px; top: 524.844px; transform: scale(0.947802, 1); transform-origin:
0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="273.91467260360736
">formato de demanda aprobado por el Poder Judicial.</div><div dir="ltr" style="
font-size: 11.7333px; font-family: sans-serif; left: 462.47px; top: 548.31px; tr
ansform: scale(1.01985, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font
_p0_1" data-canvas-width="213.1477379531861">Artculo 17.- Admisin de la demanda</div><
div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 462.47

px; top: 560.044px; transform: scale(0.936469, 1); transform-origin: 0% 0% 0px;"


data-font-name="g_font_p0_75" data-canvas-width="280.00427273559575">El juez ve
rifi ca el cumplimiento de los requisitos de la </div><div dir="ltr" style="font
-size: 11.7333px; font-family: sans-serif; left: 443.755px; top: 571.777px; tran
sform: scale(0.937617, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_
p0_75" data-canvas-width="293.47413969421405">demanda dentro de los cinco (5) das
hbiles siguientes </div><div dir="ltr" style="font-size: 11.7333px; font-family: s
ans-serif; left: 443.755px; top: 583.51px; transform: scale(0.946039, 1); transf
orm-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="287.595
739566803">de recibida. Si observa el incumplimiento de alguno de </div><div dir
="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 443.755px; to
p: 595.244px; transform: scale(0.942737, 1); transform-origin: 0% 0% 0px;" datafont-name="g_font_p0_75" data-canvas-width="277.16480600738527">los requisitos,
concede al demandante cinco (5) das </div><div dir="ltr" style="font-size: 11.7333
px; font-family: sans-serif; left: 443.755px; top: 606.977px; transform: scale(0
.938104, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-ca
nvas-width="273.9264059371949">hbiles para que subsane la omisin o defecto, bajo </d
iv><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 44
3.755px; top: 618.71px; transform: scale(0.943085, 1); transform-origin: 0% 0% 0
px;" data-font-name="g_font_p0_75" data-canvas-width="298.01493979263313">aperci
bimiento de declararse la conclusin del proceso y </div><div dir="ltr" style="font
-size: 11.7333px; font-family: sans-serif; left: 443.755px; top: 630.444px; tran
sform: scale(0.949985, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_
p0_75" data-canvas-width="295.44533973693865">el archivo del expediente. La reso
lucin que disponga la </div><div dir="ltr" style="font-size: 11.7333px; font-famil
y: sans-serif; left: 443.755px; top: 642.177px; transform: scale(0.944609, 1); t
ransform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="29
2.82880634689343">conclusin del proceso es apelable en el plazo de cinco </div><di
v dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 443.755p
x; top: 653.91px; transform: scale(0.937876, 1); transform-origin: 0% 0% 0px;" d
ata-font-name="g_font_p0_75" data-canvas-width="83.47093514251709">(5) das hbiles.</
div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 4
62.458px; top: 665.644px; transform: scale(0.948406, 1); transform-origin: 0% 0%
0px;" data-font-name="g_font_p0_75" data-canvas-width="290.21227295684827">Exce
pcionalmente, en el caso de que la improcedencia </div><div dir="ltr" style="fon
t-size: 11.7333px; font-family: sans-serif; left: 443.755px; top: 677.377px; tra
nsform: scale(0.954814, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font
_p0_75" data-canvas-width="304.5856066017152">de la demanda sea notoria, el juez
la rechaza de plano en </div><div dir="ltr" style="font-size: 11.7333px; font-f
amily: sans-serif; left: 443.755px; top: 689.11px; transform: scale(0.938921, 1)
; transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width=
"303.2714732398989">resolucin fundamentada. La resolucin es apelable en el </div><di
v dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 443.755p
x; top: 700.844px; transform: scale(0.942933, 1); transform-origin: 0% 0% 0px;"
data-font-name="g_font_p0_75" data-canvas-width="217.81760472106933">plazo de ci
nco (5) das hbiles siguientes.</div><div dir="ltr" style="font-size: 11.7333px; font
-family: sans-serif; left: 462.458px; top: 724.31px; transform: scale(1.01767, 1
); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_1" data-canvas-width=
"285.9648061981203">Artculo 18.- Demanda de liquidacin de derechos </div><div dir="ltr
" style="font-size: 11.7333px; font-family: sans-serif; left: 443.755px; top: 73
6.044px; transform: scale(1.02756, 1); transform-origin: 0% 0% 0px;" data-font-n
ame="g_font_p0_1" data-canvas-width="67.81866813659667">individuales</div><div d
ir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 462.458px;
top: 747.777px; transform: scale(0.947247, 1); transform-origin: 0% 0% 0px;" dat
a-font-name="g_font_p0_75" data-canvas-width="278.49067270278937">Cuando en una
sentencia se declare la existencia de </div><div dir="ltr" style="font-size: 11.
7333px; font-family: sans-serif; left: 443.755px; top: 759.51px; transform: scal
e(0.952277, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data
-canvas-width="285.6832061920167">afectacin de un derecho que corresponda a un gru
po </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; le

ft: 443.755px; top: 771.244px; transform: scale(0.951368, 1); transform-origin:


0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="288.26453958129895"
>o categora de prestadores de servicios, con contenido </div><div dir="ltr" style=
"font-size: 11.7333px; font-family: sans-serif; left: 443.755px; top: 782.977px;
transform: scale(0.939064, 1); transform-origin: 0% 0% 0px;" data-font-name="g_
font_p0_75" data-canvas-width="305.1957399482728">patrimonial, los miembros del
grupo o categora o quienes </div><div dir="ltr" style="font-size: 11.7333px; fontfamily: sans-serif; left: 443.755px; top: 794.71px; transform: scale(0.94066, 1)
; transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width=
"293.48587302780163">individualmente hubiesen sido afectados pueden iniciar, </d
iv><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 44
3.755px; top: 806.444px; transform: scale(0.937617, 1); transform-origin: 0% 0%
0px;" data-font-name="g_font_p0_75" data-canvas-width="293.474139694214">sobre l
a base de dicha sentencia, procesos individuales </div><div dir="ltr" style="fon
t-size: 11.7333px; font-family: sans-serif; left: 443.755px; top: 818.177px; tra
nsform: scale(0.947281, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font
_p0_75" data-canvas-width="299.3408064880372">de liquidacin del derecho reconocido
, siempre y cuando </div><div dir="ltr" style="font-size: 11.7333px; font-family
: sans-serif; left: 443.755px; top: 829.91px; transform: scale(0.952199, 1); tra
nsform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="298.
0384064598084">la sentencia declarativa haya sido dictada por el Tribunal </div>
<div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 443.7
55px; top: 841.644px; transform: scale(0.948334, 1); transform-origin: 0% 0% 0px
;" data-font-name="g_font_p0_75" data-canvas-width="269.3269391708375">Constituc
ional o la Corte Suprema de Justicia de la </div><div dir="ltr" style="font-size
: 11.7333px; font-family: sans-serif; left: 443.755px; top: 853.377px; transform
: scale(0.956172, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75
" data-canvas-width="295.45707307052623">Repblica, y haya pasado en autoridad de c
osa juzgada.</div><div dir="ltr" style="font-size: 11.7333px; font-family: sansserif; left: 462.458px; top: 865.11px; transform: scale(0.945865, 1); transformorigin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="266.7338724
479676">En el proceso individual de liquidacin del derecho </div><div dir="ltr" st
yle="font-size: 11.7333px; font-family: sans-serif; left: 443.755px; top: 876.84
4px; transform: scale(0.944901, 1); transform-origin: 0% 0% 0px;" data-font-name
="g_font_p0_75" data-canvas-width="286.30507287216204">reconocido es improcedent
e negar el hecho declarado </div><div dir="ltr" style="font-size: 11.7333px; fon
t-family: sans-serif; left: 443.755px; top: 888.577px; transform: scale(0.94483,
1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-wid
th="294.7870997226716">lesivo en la sentencia del Tribunal Constitucional o de l
a </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; lef
t: 443.771px; top: 900.31px; transform: scale(0.947115, 1); transform-origin: 0%
0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="307.812273338318">Cor
te Suprema de Justicia de la Repblica. El demandado </div><div dir="ltr" style="fo
nt-size: 11.7333px; font-family: sans-serif; left: 443.771px; top: 912.044px; tr
ansform: scale(0.945955, 1); transform-origin: 0% 0% 0px;" data-font-name="g_fon
t_p0_75" data-canvas-width="304.59733993530284">puede, en todo caso, demostrar q
ue el demandante no se </div><div dir="ltr" style="font-size: 11.7333px; font-fa
mily: sans-serif; left: 443.771px; top: 923.777px; transform: scale(0.951554, 1)
; transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width=
"290.22400629043597">encuentra en el mbito fctico recogido en la sentencia.</div><di
v dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 462.474p
x; top: 947.244px; transform: scale(1.02978, 1); transform-origin: 0% 0% 0px;" d
ata-font-name="g_font_p0_1" data-canvas-width="240.96747188949595">Artculo 19.- Requ
isitos de la contestacin</div><div dir="ltr" style="font-size: 11.7333px; font-fam
ily: sans-serif; left: 462.474px; top: 958.977px; transform: scale(0.944188, 1);
transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="
288.92160626220704">La contestacin de la demanda se presenta por escrito </div><di
v dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 443.771p
x; top: 970.71px; transform: scale(0.948983, 1); transform-origin: 0% 0% 0px;" d
ata-font-name="g_font_p0_75" data-canvas-width="306.52160664367693">y debe conte

ner los requisitos y anexos establecidos en la </div><div dir="ltr" style="fontsize: 11.7333px; font-family: sans-serif; left: 443.771px; top: 982.444px; trans
form: scale(0.942109, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p
0_75" data-canvas-width="298.6485398063661">norma procesal civil, sin incluir ni
ngn pliego dirigido a la </div><div dir="ltr" style="font-size: 11.7333px; font-fa
mily: sans-serif; left: 443.771px; top: 994.177px; transform: scale(0.94316, 1);
transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="
298.0384064598084">contraparte, los testigos o los peritos; sin embargo, debe </
div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 4
43.771px; top: 1005.91px; transform: scale(0.931329, 1); transform-origin: 0% 0%
0px;" data-font-name="g_font_p0_75" data-canvas-width="245.87083199577333">indi
carse la fi nalidad de cada medio de prueba.</div><div dir="ltr" style="font-siz
e: 11.7333px; font-family: sans-serif; left: 462.486px; top: 1017.64px; transfor
m: scale(0.936761, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_7
5" data-canvas-width="294.1429397087099">La contestacin contiene todas las defensa
s procesales </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans
-serif; left: 443.783px; top: 1029.38px; transform: scale(0.952274, 1); transfor
m-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="298.06187
312698376">y de fondo que el demandado estime convenientes. Si el </div><div dir
="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 443.783px; to
p: 1041.11px; transform: scale(0.93942, 1); transform-origin: 0% 0% 0px;" data-f
ont-name="g_font_p0_75" data-canvas-width="307.1904066581727">demandado no niega
expresamente los hechos expuestos </div><div dir="ltr" style="font-size: 11.733
3px; font-family: sans-serif; left: 443.783px; top: 1052.84px; transform: scale(
0.930032, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-c
anvas-width="264.12907239151">en la demanda, estos son considerados admitidos.</
div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 4
62.486px; top: 1064.58px; transform: scale(0.94891, 1); transform-origin: 0% 0%
0px;" data-font-name="g_font_p0_75" data-canvas-width="179.34400388717654">La re
convencin es improcedente.</div><div dir="ltr" style="font-size: 11.7333px; font-f
amily: sans-serif; left: 462.486px; top: 1088.04px; transform: scale(1.01653, 1)
; transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_1" data-canvas-width="
242.95040526580826">Artculo 20.- Caso especial de procedencia</div><div dir="ltr" st
yle="font-size: 11.7333px; font-family: sans-serif; left: 462.486px; top: 1099.7
8px; transform: scale(0.942268, 1); transform-origin: 0% 0% 0px;" data-font-name
="g_font_p0_75" data-canvas-width="273.2576059226991">En el caso de pretensiones
referidas a la prestacin </div><div dir="ltr" style="font-size: 11.7333px; font-f
amily: sans-serif; left: 443.783px; top: 1111.51px; transform: scale(0.949748, 1
); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width
="239.33653852081304">personal de servicios, de naturaleza laboral o </div><div
dir="ltr" style="font-size: 11.7333px; font-family: sans-serif; left: 443.783px;
top: 1123.24px; transform: scale(0.949405, 1); transform-origin: 0% 0% 0px;" da
ta-font-name="g_font_p0_75" data-canvas-width="268.68160582351703">administrativ
a de derecho pblico, no es exigible el </div><div dir="ltr" style="font-size: 11.7
333px; font-family: sans-serif; left: 443.783px; top: 1134.98px; transform: scal
e(0.947485, 1); transform-origin: 0% 0% 0px;" data-font-name="g_font_p0_75" data
-canvas-width="301.3002731971742">agotamiento de la va administrativa establecida
segn la </div><div dir="ltr" style="font-size: 11.7333px; font-family: sans-serif;
left: 443.783px; top: 1146.71px; transform: scale(0.941013, 1); transform-origi
n: 0% 0% 0px;" data-font-name="g_font_p0_75" data-canvas-width="305.829339962005
7">legislacin general del procedimiento administrativo, salvo </div></div></div><a
name="5"></a><div style="width: 872px; height: 1234px;" class="page" id="pageCo
ntainer5"><div class="loadingIcon"></div></div><a name="6"></a><div style="width
: 872px; height: 1234px;" class="page" id="pageContainer6"><div class="loadingIc
on"></div></div><a name="7"></a><div style="width: 872px; height: 1234px;" class
="page" id="pageContainer7"><div class="loadingIcon"></div></div><a name="8"></a
><div style="width: 872px; height: 1234px;" class="page" id="pageContainer8"><di
v class="loadingIcon"></div></div><a name="9"></a><div style="width: 872px; heig
ht: 1234px;" class="page" id="pageContainer9"><div class="loadingIcon"></div></d
iv><a name="10"></a><div style="width: 872px; height: 1234px;" class="page" id="

pageContainer10"><div class="loadingIcon"></div></div><a name="11"></a><div styl


e="width: 872px; height: 1234px;" class="page" id="pageContainer11"><div class="
loadingIcon"></div></div></div>
</div>

></div>

<div id="loadingBox" hidden="true">


<div id="loading"></div>
<div id="loadingBar"><div style="height: 100%;" class="progress"></div
</div>

<div id="errorWrapper" hidden="true">


<div id="errorMessageLeft">
<span id="errorMessage"></span>
<button id="errorShowMore" onclick="" oncontextmenu="return false;"
data-l10n-id="error_more_info">Ms informacin</button>
<button id="errorShowLess" onclick="" oncontextmenu="return false;"
data-l10n-id="error_less_info" hidden="true">Menos informacin</button>
</div>
<div id="errorMessageRight">
<button id="errorClose" oncontextmenu="return false;" data-l10n-id="
error_close">Cerrar</button>
</div>
<div class="clearBoth"></div>
<textarea id="errorMoreInfo" readonly="readonly" hidden="true"></texta
rea>
</div>
</div> <!-- mainContainer -->
</div> <!-- outerContainer -->
<div id="printContainer"></div>

</body></html>/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-of


fset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* Copyright 2012 Mozilla Foundation
*
* 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
var
var
var
var
var
var

DEFAULT_URL = 'compressed.tracemonkey-pldi-09.pdf';
DEFAULT_SCALE = 'auto';
DEFAULT_SCALE_DELTA = 1.1;
UNKNOWN_SCALE = 0;
CACHE_SIZE = 20;
CSS_UNITS = 96.0 / 72.0;

var SCROLLBAR_PADDING = 40;


var VERTICAL_PADDING = 5;
var MIN_SCALE = 0.25;
var MAX_SCALE = 4.0;
var IMAGE_DIR = './images/';
var SETTINGS_MEMORY = 20;
var ANNOT_MIN_SIZE = 10;
var RenderingStates = {
INITIAL: 0,
RUNNING: 1,
PAUSED: 2,
FINISHED: 3
};
var FindStates = {
FIND_FOUND: 0,
FIND_NOTFOUND: 1,
FIND_WRAPPED: 2,
FIND_PENDING: 3
};
PDFJS.workerSrc = '../build/pdf.js';
var mozL10n = document.mozL10n || document.webL10n;
function getFileName(url) {
var anchor = url.indexOf('#');
var query = url.indexOf('?');
var end = Math.min(
anchor > 0 ? anchor : url.length,
query > 0 ? query : url.length);
return url.substring(url.lastIndexOf('/', end) + 1, end);
}
function scrollIntoView(element, spot) {
var parent = element.offsetParent, offsetY = element.offsetTop;
while (parent.clientHeight == parent.scrollHeight) {
offsetY += parent.offsetTop;
parent = parent.offsetParent;
if (!parent)
return; // no need to scroll
}
if (spot)
offsetY += spot.top;
parent.scrollTop = offsetY;
}
var Cache = function cacheCache(size) {
var data = [];
this.push = function cachePush(view) {
var i = data.indexOf(view);
if (i >= 0)
data.splice(i);
data.push(view);
if (data.length > size)
data.shift().destroy();
};
};
var ProgressBar = (function ProgressBarClosure() {

function clamp(v, min, max) {


return Math.min(Math.max(v, min), max);
}
function ProgressBar(id, opts) {
// Fetch the sub-elements for later
this.div = document.querySelector(id + ' .progress');
// Get options, with sensible defaults
this.height = opts.height || 100;
this.width = opts.width || 100;
this.units = opts.units || '%';
// Initialize heights
this.div.style.height = this.height + this.units;

ProgressBar.prototype = {
updateBar: function ProgressBar_updateBar() {
if (this._indeterminate) {
this.div.classList.add('indeterminate');
return;
}
var progressSize = this.width * this._percent / 100;
if (this._percent > 95)
this.div.classList.add('full');
else
this.div.classList.remove('full');
this.div.classList.remove('indeterminate');
this.div.style.width = progressSize + this.units;

},

get percent() {
return this._percent;
},
set percent(val) {
this._indeterminate = isNaN(val);
this._percent = clamp(val, 0, 100);
this.updateBar();
}

};

return ProgressBar;
})();
/*
*
*
*
*
*
*
*
*

Copyright 2012 Mozilla Foundation


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
Unless required by applicable law or agreed to in writing, software

* distributed under the License is distributed on an "AS IS" BASIS,


* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var FirefoxCom = (function FirefoxComClosure() {
return {
/**
* Creates an event that the extension is listening for and will
* synchronously respond to.
* NOTE: It is reccomended to use request() instead since one day we may not
* be able to synchronously reply.
* @param {String} action The action to trigger.
* @param {String} data Optional data to send.
* @return {*} The response.
*/
requestSync: function(action, data) {
var request = document.createTextNode('');
request.setUserData('action', action, null);
request.setUserData('data', data, null);
request.setUserData('sync', true, null);
document.documentElement.appendChild(request);
var sender = document.createEvent('Events');
sender.initEvent('pdf.js.message', true, false);
request.dispatchEvent(sender);
var response = request.getUserData('response');
document.documentElement.removeChild(request);
return response;

},
/**
* Creates an event that the extension is listening for and will
* asynchronously respond by calling the callback.
* @param {String} action The action to trigger.
* @param {String} data Optional data to send.
* @param {Function} callback Optional response callback that will be called
* with one data argument.
*/
request: function(action, data, callback) {
var request = document.createTextNode('');
request.setUserData('action', action, null);
request.setUserData('data', data, null);
request.setUserData('sync', false, null);
if (callback) {
request.setUserData('callback', callback, null);
document.addEventListener('pdf.js.response', function listener(event) {
var node = event.target,
callback = node.getUserData('callback'),
response = node.getUserData('response');
document.documentElement.removeChild(node);
document.removeEventListener('pdf.js.response', listener, false);
return callback(response);
}, false);

}
document.documentElement.appendChild(request);

}
};
})();

var sender = document.createEvent('HTMLEvents');


sender.initEvent('pdf.js.message', true, false);
return request.dispatchEvent(sender);

// Settings Manager - This is a utility for saving settings


// First we see if localStorage is available
// If not, we use FUEL in FF
// Use asyncStorage for B2G
var Settings = (function SettingsClosure() {
var isLocalStorageEnabled = (function localStorageEnabledTest() {
// Feature test as per http://diveintohtml5.info/storage.html
// The additional localStorage call is to get around a FF quirk, see
// bug #495747 in bugzilla
try {
return 'localStorage' in window && window['localStorage'] !== null &&
localStorage;
} catch (e) {
return false;
}
})();
function Settings(fingerprint) {
this.fingerprint = fingerprint;
this.initializedPromise = new PDFJS.Promise();
var resolvePromise = (function settingsResolvePromise(db) {
this.initialize(db || '{}');
this.initializedPromise.resolve();
}).bind(this);
resolvePromise(FirefoxCom.requestSync('getDatabase', null));
}
Settings.prototype = {
initialize: function settingsInitialize(database) {
database = JSON.parse(database);
if (!('files' in database))
database.files = [];
if (database.files.length >= SETTINGS_MEMORY)
database.files.shift();
var index;
for (var i = 0, length = database.files.length; i < length; i++) {
var branch = database.files[i];
if (branch.fingerprint == this.fingerprint) {
index = i;
break;
}
}
if (typeof index != 'number')
index = database.files.push({fingerprint: this.fingerprint}) - 1;
this.file = database.files[index];
this.database = database;
},

set: function settingsSet(name, val) {


if (!this.initializedPromise.isResolved)
return;
var file = this.file;
file[name] = val;
var database = JSON.stringify(this.database);
FirefoxCom.requestSync('setDatabase', database);

},

get: function settingsGet(name, defaultValue) {


if (!this.initializedPromise.isResolved)
return defaultValue;
}

return this.file[name] || defaultValue;

};

return Settings;
})();
var cache = new Cache(CACHE_SIZE);
var currentPageNumber = 1;
var PDFFindController = {
startedTextExtraction: false,
extractTextPromises: [],
// If active, find results will be highlighted.
active: false,
// Stores the text for each page.
pageContents: [],
pageMatches: [],
// Currently selected match.
selected: {
pageIdx: -1,
matchIdx: -1
},
// Where find algorithm currently is in the document.
offset: {
pageIdx: null,
matchIdx: null
},
resumePageIdx: null,
resumeCallback: null,
state: null,
dirtyMatch: false,
findTimeout: null,
initialize: function() {

var events = [
'find',
'findagain',
'findhighlightallchange',
'findcasesensitivitychange'
];
this.handleEvent = this.handleEvent.bind(this);
for (var i = 0; i < events.length; i++) {
window.addEventListener(events[i], this.handleEvent);
}

},

calcFindMatch: function(pageIndex) {
var pageContent = this.pageContents[pageIndex];
var query = this.state.query;
var caseSensitive = this.state.caseSensitive;
var queryLen = query.length;
if (queryLen === 0) {
// Do nothing the matches should be wiped out already.
return;
}
if (!caseSensitive) {
pageContent = pageContent.toLowerCase();
query = query.toLowerCase();
}
var matches = [];
var matchIdx = -queryLen;
while (true) {
matchIdx = pageContent.indexOf(query, matchIdx + queryLen);
if (matchIdx === -1) {
break;
}
matches.push(matchIdx);
}
this.pageMatches[pageIndex] = matches;
this.updatePage(pageIndex);
if (this.resumePageIdx === pageIndex) {
var callback = this.resumeCallback;
this.resumePageIdx = null;
this.resumeCallback = null;
callback();
}

},

extractText: function() {
if (this.startedTextExtraction) {
return;
}
this.startedTextExtraction = true;
this.pageContents = [];
for (var i = 0, ii = PDFView.pdfDocument.numPages; i < ii; i++) {
this.extractTextPromises.push(new PDFJS.Promise());

}
var self = this;
function extractPageText(pageIndex) {
PDFView.pages[pageIndex].getTextContent().then(
function textContentResolved(data) {
// Build the find string.
var bidiTexts = data.bidiTexts;
var str = '';
for (var i = 0; i < bidiTexts.length; i++) {
str += bidiTexts[i].str;
}
// Store the pageContent as a string.
self.pageContents.push(str);

self.extractTextPromises[pageIndex].resolve(pageIndex);
if ((pageIndex + 1) < PDFView.pages.length)
extractPageText(pageIndex + 1);

);

}
extractPageText(0);
return this.extractTextPromise;

},

handleEvent: function(e) {
if (this.state === null || e.type !== 'findagain') {
this.dirtyMatch = true;
}
this.state = e.detail;
this.updateUIState(FindStates.FIND_PENDING);
this.extractText();
clearTimeout(this.findTimeout);
if (e.type === 'find') {
// Only trigger the find action after 250ms of silence.
this.findTimeout = setTimeout(this.nextMatch.bind(this), 250);
} else {
this.nextMatch();
}

},

updatePage: function(idx) {
var page = PDFView.pages[idx];
if (this.selected.pageIdx === idx) {
// If the page is selected, scroll the page into view, which triggers
// rendering the page, which adds the textLayer. Once the textLayer is
// build, it will scroll onto the selected match.
page.scrollIntoView();
}

},

if (page.textLayer) {
page.textLayer.updateMatches();
}

nextMatch: function() {
var pages = PDFView.pages;
var previous = this.state.findPrevious;
var numPages = PDFView.pages.length;
this.active = true;
if (this.dirtyMatch) {
// Need to recalculate the matches, reset everything.
this.dirtyMatch = false;
this.selected.pageIdx = this.selected.matchIdx = -1;
this.offset.pageIdx = previous ? numPages - 1 : 0;
this.offset.matchIdx = null;
this.hadMatch = false;
this.resumeCallback = null;
this.resumePageIdx = null;
this.pageMatches = [];
var self = this;
for (var i = 0; i < numPages; i++) {
// Wipe out any previous highlighted matches.
this.updatePage(i);

// As soon as the text is extracted start finding the matches.


this.extractTextPromises[i].onData(function(pageIdx) {
// Use a timeout since all the pages may already be extracted and we
// want to start highlighting before finding all the matches.
setTimeout(function() {
self.calcFindMatch(pageIdx);
});
});

// If there's no query there's no point in searching.


if (this.state.query === '') {
this.updateUIState(FindStates.FIND_FOUND);
return;
}
// If we're waiting on a page, we return since we can't do anything else.
if (this.resumeCallback) {
return;
}
var offset = this.offset;
// If there's already a matchIdx that means we are iterating through a
// page's matches.
if (offset.matchIdx !== null) {
var numPageMatches = this.pageMatches[offset.pageIdx].length;
if ((!previous && offset.matchIdx + 1 < numPageMatches) ||
(previous && offset.matchIdx > 0)) {
// The simple case, we just have advance the matchIdx to select the next
// match on the page.
this.hadMatch = true;
offset.matchIdx = previous ? offset.matchIdx - 1 : offset.matchIdx + 1;
this.updateMatch(true);
return;
}
// We went beyond the current page's matches, so we advance to the next

// page.
this.advanceOffsetPage(previous);

}
// Start searching through the page.
this.nextPageMatch();

},

nextPageMatch: function() {
if (this.resumePageIdx !== null)
console.error('There can only be one pending page.');
var matchesReady = function(matches) {
var offset = this.offset;
var numMatches = matches.length;
var previous = this.state.findPrevious;
if (numMatches) {
// There were matches for the page, so initialize the matchIdx.
this.hadMatch = true;
offset.matchIdx = previous ? numMatches - 1 : 0;
this.updateMatch(true);
} else {
// No matches attempt to search the next page.
this.advanceOffsetPage(previous);
if (offset.wrapped) {
offset.matchIdx = null;
if (!this.hadMatch) {
// No point in wrapping there were no matches.
this.updateMatch(false);
return;
}
}
// Search the next page.
this.nextPageMatch();
}
}.bind(this);
var pageIdx = this.offset.pageIdx;
var pageMatches = this.pageMatches;
if (!pageMatches[pageIdx]) {
// The matches aren't ready setup a callback so we can be notified,
// when they are ready.
this.resumeCallback = function() {
matchesReady(pageMatches[pageIdx]);
};
this.resumePageIdx = pageIdx;
return;
}
// The matches are finished already.
matchesReady(pageMatches[pageIdx]);

},

advanceOffsetPage: function(previous) {
var offset = this.offset;
var numPages = this.extractTextPromises.length;
offset.pageIdx = previous ? offset.pageIdx - 1 : offset.pageIdx + 1;
offset.matchIdx = null;
if (offset.pageIdx >= numPages || offset.pageIdx < 0) {
offset.pageIdx = previous ? numPages - 1 : 0;
offset.wrapped = true;
return;

},

updateMatch: function(found) {
var state = FindStates.FIND_NOTFOUND;
var wrapped = this.offset.wrapped;
this.offset.wrapped = false;
if (found) {
var previousPage = this.selected.pageIdx;
this.selected.pageIdx = this.offset.pageIdx;
this.selected.matchIdx = this.offset.matchIdx;
state = wrapped ? FindStates.FIND_WRAPPED : FindStates.FIND_FOUND;
// Update the currently selected page to wipe out any selected matches.
if (previousPage !== -1 && previousPage !== this.selected.pageIdx) {
this.updatePage(previousPage);
}
}
this.updateUIState(state, this.state.findPrevious);
if (this.selected.pageIdx !== -1) {
this.updatePage(this.selected.pageIdx, true);
}
},
updateUIState: function(state, previous) {
if (PDFView.supportsIntegratedFind) {
FirefoxCom.request('updateFindControlState',
{result: state, findPrevious: previous});
return;
}
PDFFindBar.updateUIState(state, previous);
}

};

var PDFFindBar = {
// TODO: Enable the FindBar *AFTER* the pagesPromise in the load function
// got resolved
opened: false,
initialize: function() {
this.bar = document.getElementById('findbar');
this.toggleButton = document.getElementById('viewFind');
this.findField = document.getElementById('findInput');
this.highlightAll = document.getElementById('findHighlightAll');
this.caseSensitive = document.getElementById('findMatchCase');
this.findMsg = document.getElementById('findMsg');
this.findStatusIcon = document.getElementById('findStatusIcon');
var self = this;
this.toggleButton.addEventListener('click', function() {
self.toggle();
});
this.findField.addEventListener('input', function() {
self.dispatchEvent('');
});
this.bar.addEventListener('keydown', function(evt) {
switch (evt.keyCode) {
case 13: // Enter

}
});

if (evt.target === self.findField) {


self.dispatchEvent('again', evt.shiftKey);
}
break;
case 27: // Escape
self.close();
break;

document.getElementById('findPrevious').addEventListener('click',
function() { self.dispatchEvent('again', true); }
);
document.getElementById('findNext').addEventListener('click', function() {
self.dispatchEvent('again', false);
});
this.highlightAll.addEventListener('click', function() {
self.dispatchEvent('highlightallchange');
});
this.caseSensitive.addEventListener('click', function() {
self.dispatchEvent('casesensitivitychange');
});

},

dispatchEvent: function(aType, aFindPrevious) {


var event = document.createEvent('CustomEvent');
event.initCustomEvent('find' + aType, true, true, {
query: this.findField.value,
caseSensitive: this.caseSensitive.checked,
highlightAll: this.highlightAll.checked,
findPrevious: aFindPrevious
});
return window.dispatchEvent(event);
},
updateUIState: function(state, previous) {
var notFound = false;
var findMsg = '';
var status = '';
switch (state) {
case FindStates.FIND_FOUND:
break;
case FindStates.FIND_PENDING:
status = 'pending';
break;
case FindStates.FIND_NOTFOUND:
findMsg = mozL10n.get('find_not_found', null, 'Phrase not found');
notFound = true;
break;
case FindStates.FIND_WRAPPED:
if (previous) {
findMsg = mozL10n.get('find_reached_top', null,
'Reached top of document, continued from bottom');

} else {
findMsg = mozL10n.get('find_reached_bottom', null,
'Reached end of document, continued from top');
}
break;

if (notFound) {
this.findField.classList.add('notFound');
} else {
this.findField.classList.remove('notFound');
}
this.findField.setAttribute('data-status', status);
this.findMsg.textContent = findMsg;

},

open: function() {
if (this.opened) return;
this.opened = true;
this.toggleButton.classList.add('toggled');
this.bar.classList.remove('hidden');
this.findField.select();
this.findField.focus();

},

close: function() {
if (!this.opened) return;
this.opened = false;
this.toggleButton.classList.remove('toggled');
this.bar.classList.add('hidden');
PDFFindController.active = false;

},

toggle: function() {
if (this.opened) {
this.close();
} else {
this.open();
}
}

};

var PDFView = {
pages: [],
thumbnails: [],
currentScale: UNKNOWN_SCALE,
currentScaleValue: null,
initialBookmark: document.location.hash.substring(1),
startedTextExtraction: false,
pageText: [],
container: null,
thumbnailContainer: null,
initialized: false,
fellback: false,
pdfDocument: null,
sidebarOpen: false,

pageViewScroll: null,
thumbnailViewScroll: null,
isFullscreen: false,
previousScale: null,
pageRotation: 0,
mouseScrollTimeStamp: 0,
mouseScrollDelta: 0,
lastScroll: 0,
// called once when the document is loaded
initialize: function pdfViewInitialize() {
var self = this;
var container = this.container = document.getElementById('viewerContainer');
this.pageViewScroll = {};
this.watchScroll(container, this.pageViewScroll, updateViewarea);
var thumbnailContainer = this.thumbnailContainer =
document.getElementById('thumbnailView');
this.thumbnailViewScroll = {};
this.watchScroll(thumbnailContainer, this.thumbnailViewScroll,
this.renderHighestPriority.bind(this));
PDFFindBar.initialize();
PDFFindController.initialize();
this.initialized = true;
container.addEventListener('scroll', function() {
self.lastScroll = Date.now();
}, false);

},

// Helper function to keep track whether a div was scrolled up or down and
// then call a callback.
watchScroll: function pdfViewWatchScroll(viewAreaElement, state, callback) {
state.down = true;
state.lastY = viewAreaElement.scrollTop;
viewAreaElement.addEventListener('scroll', function webViewerScroll(evt) {
var currentY = viewAreaElement.scrollTop;
var lastY = state.lastY;
if (currentY > lastY)
state.down = true;
else if (currentY < lastY)
state.down = false;
// else do nothing and use previous value
state.lastY = currentY;
callback();
}, true);
},
setScale: function pdfViewSetScale(val, resetAutoSettings, noScroll) {
if (val == this.currentScale)
return;
var pages = this.pages;
for (var i = 0; i < pages.length; i++)
pages[i].update(val * CSS_UNITS);
if (!noScroll && this.currentScale != val)
this.pages[this.page - 1].scrollIntoView();
this.currentScale = val;

var event = document.createEvent('UIEvents');


event.initUIEvent('scalechange', false, false, window, 0);
event.scale = val;
event.resetAutoSettings = resetAutoSettings;
window.dispatchEvent(event);

},

parseScale: function pdfViewParseScale(value, resetAutoSettings, noScroll) {


if ('custom' == value)
return;
var scale = parseFloat(value);
this.currentScaleValue = value;
if (scale) {
this.setScale(scale, true, noScroll);
return;
}
var container = this.container;
var currentPage = this.pages[this.page - 1];
if (!currentPage) {
return;
}
var pageWidthScale = (container.clientWidth - SCROLLBAR_PADDING) /
currentPage.width * currentPage.scale / CSS_UNITS;
var pageHeightScale = (container.clientHeight - VERTICAL_PADDING) /
currentPage.height * currentPage.scale / CSS_UNITS;
switch (value) {
case 'page-actual':
scale = 1;
break;
case 'page-width':
scale = pageWidthScale;
break;
case 'page-height':
scale = pageHeightScale;
break;
case 'page-fit':
scale = Math.min(pageWidthScale, pageHeightScale);
break;
case 'auto':
scale = Math.min(1.0, pageWidthScale);
break;
}
this.setScale(scale, resetAutoSettings, noScroll);
selectScaleOption(value);

},

zoomIn: function pdfViewZoomIn() {


var newScale = (this.currentScale * DEFAULT_SCALE_DELTA).toFixed(2);
newScale = Math.min(MAX_SCALE, newScale);
this.parseScale(newScale, true);
},
zoomOut: function pdfViewZoomOut() {
var newScale = (this.currentScale / DEFAULT_SCALE_DELTA).toFixed(2);
newScale = Math.max(MIN_SCALE, newScale);

this.parseScale(newScale, true);

},

set page(val) {
var pages = this.pages;
var input = document.getElementById('pageNumber');
var event = document.createEvent('UIEvents');
event.initUIEvent('pagechange', false, false, window, 0);
if (!(0 < val && val <= pages.length)) {
event.pageNumber = this.page;
window.dispatchEvent(event);
return;
}
pages[val - 1].updateStats();
currentPageNumber = val;
event.pageNumber = val;
window.dispatchEvent(event);
// checking if the this.page was called from the updateViewarea function:
// avoiding the creation of two "set page" method (internal and public)
if (updateViewarea.inProgress)
return;
// Avoid scrolling the first page during loading
if (this.loading && val == 1)
return;
pages[val - 1].scrollIntoView();

},

get page() {
return currentPageNumber;
},
get supportsPrinting() {
var canvas = document.createElement('canvas');
var value = 'mozPrintCallback' in canvas;
// shadow
Object.defineProperty(this, 'supportsPrinting', { value: value,
enumerable: true,
configurable: true,
writable: false });
return value;
},
get supportsFullscreen() {
var doc = document.documentElement;
var support = doc.requestFullscreen || doc.mozRequestFullScreen ||
doc.webkitRequestFullScreen;
// Disable fullscreen button if we're in an iframe
if (!!window.frameElement)
support = false;
Object.defineProperty(this, 'supportsFullScreen', { value: support,
enumerable: true,
configurable: true,
writable: false });

return support;

},

get supportsIntegratedFind() {
var support = false;
support = FirefoxCom.requestSync('supportsIntegratedFind');
Object.defineProperty(this, 'supportsIntegratedFind', { value: support,
enumerable: true,
configurable: true,
writable: false });
return support;
},
initPassiveLoading: function pdfViewInitPassiveLoading() {
if (!PDFView.loadingBar) {
PDFView.loadingBar = new ProgressBar('#loadingBar', {});
}
window.addEventListener('message', function window_message(e) {
var args = e.data;
if (typeof args !== 'object' || !('pdfjsLoadAction' in args))
return;
switch (args.pdfjsLoadAction) {
case 'progress':
PDFView.progress(args.loaded / args.total);
break;
case 'complete':
if (!args.data) {
PDFView.error(mozL10n.get('loading_error', null,
'An error occurred while loading the PDF.'), e);
break;
}
PDFView.open(args.data, 0);
break;
}
});
FirefoxCom.requestSync('initPassiveLoading', null);

},

setTitleUsingUrl: function pdfViewSetTitleUsingUrl(url) {


this.url = url;
try {
document.title = decodeURIComponent(getFileName(url)) || url;
} catch (e) {
// decodeURIComponent may throw URIError,
// fall back to using the unprocessed url in that case
document.title = url;
}
},
open: function pdfViewOpen(url, scale, password) {
var parameters = {password: password};
if (typeof url === 'string') { // URL
this.setTitleUsingUrl(url);
parameters.url = url;
} else if (url && 'byteLength' in url) { // ArrayBuffer
parameters.data = url;
}

if (!PDFView.loadingBar) {
PDFView.loadingBar = new ProgressBar('#loadingBar', {});
}
this.pdfDocument = null;
var self = this;
self.loading = true;
PDFJS.getDocument(parameters).then(
function getDocumentCallback(pdfDocument) {
self.load(pdfDocument, scale);
self.loading = false;
},
function getDocumentError(message, exception) {
if (exception && exception.name === 'PasswordException') {
if (exception.code === 'needpassword') {
var promptString = mozL10n.get('request_password', null,
'PDF is protected by a password:');
password = prompt(promptString);
if (password && password.length > 0) {
return PDFView.open(url, scale, password);
}
}
}
var loadingErrorMessage = mozL10n.get('loading_error', null,
'An error occurred while loading the PDF.');
if (exception && exception.name === 'InvalidPDFException') {
// change error message also for other builds
var loadingErrorMessage = mozL10n.get('invalid_file_error', null,
'Invalid or corrupted PDF file.');
}
var loadingIndicator = document.getElementById('loading');
loadingIndicator.textContent = mozL10n.get('loading_error_indicator',
null, 'Error');
var moreInfo = {
message: message
};
self.error(loadingErrorMessage, moreInfo);
self.loading = false;

},
function getDocumentProgress(progressData) {
self.progress(progressData.loaded / progressData.total);
}

);

},

download: function pdfViewDownload() {


function noData() {
FirefoxCom.request('download', { originalUrl: url });
}
var url = this.url.split('#')[0];
// Document isn't ready just try to download with the url.
if (!this.pdfDocument) {
noData();
return;
}
this.pdfDocument.getData().then(
function getDataSuccess(data) {

var blob = PDFJS.createBlob(data.buffer, 'application/pdf');


var blobUrl = window.URL.createObjectURL(blob);
FirefoxCom.request('download', { blobUrl: blobUrl, originalUrl: url },
function response(err) {
if (err) {
// This error won't really be helpful because it's likely the
// fallback won't work either (or is already open).
PDFView.error('PDF failed to download.');
}
window.URL.revokeObjectURL(blobUrl);
}
);

},
noData // Error occurred try downloading with just the url.

);

},

fallback: function pdfViewFallback() {


// Only trigger the fallback once so we don't spam the user with messages
// for one PDF.
if (this.fellback)
return;
this.fellback = true;
var url = this.url.split('#')[0];
FirefoxCom.request('fallback', url, function response(download) {
if (!download)
return;
PDFView.download();
});
},
navigateTo: function pdfViewNavigateTo(dest) {
if (typeof dest === 'string')
dest = this.destinations[dest];
if (!(dest instanceof Array))
return; // invalid destination
// dest array looks like that: <page-ref> </XYZ|FitXXX> <args..>
var destRef = dest[0];
var pageNumber = destRef instanceof Object ?
this.pagesRefMap[destRef.num + ' ' + destRef.gen + ' R'] : (destRef + 1);
if (pageNumber > this.pages.length)
pageNumber = this.pages.length;
if (pageNumber) {
this.page = pageNumber;
var currentPage = this.pages[pageNumber - 1];
currentPage.scrollIntoView(dest);
}
},
getDestinationHash: function pdfViewGetDestinationHash(dest) {
if (typeof dest === 'string')
return PDFView.getAnchorUrl('#' + escape(dest));
if (dest instanceof Array) {
var destRef = dest[0]; // see navigateTo method for dest format
var pageNumber = destRef instanceof Object ?
this.pagesRefMap[destRef.num + ' ' + destRef.gen + ' R'] :
(destRef + 1);
if (pageNumber) {
var pdfOpenParams = PDFView.getAnchorUrl('#page=' + pageNumber);

var destKind = dest[1];


if (typeof destKind === 'object' && 'name' in destKind &&
destKind.name == 'XYZ') {
var scale = (dest[4] || this.currentScale);
pdfOpenParams += '&zoom=' + (scale * 100);
if (dest[2] || dest[3]) {
pdfOpenParams += ',' + (dest[2] || 0) + ',' + (dest[3] || 0);
}
}
return pdfOpenParams;

}
}
return '';

},

/**
* For the firefox extension we prefix the full url on anchor links so they
* don't come up as resource:// urls and so open in new tab/window works.
* @param {String} anchor The anchor hash include the #.
*/
getAnchorUrl: function getAnchorUrl(anchor) {
return this.url.split('#')[0] + anchor;
},
/**
* Returns scale factor for the canvas. It makes sense for the HiDPI displays.
* @return {Object} The object with horizontal (sx) and vertical (sy)
scales. The scaled property is set to false if scaling is
not required, true otherwise.
*/
getOutputScale: function pdfViewGetOutputDPI() {
var pixelRatio = 'devicePixelRatio' in window ? window.devicePixelRatio : 1;
return {
sx: pixelRatio,
sy: pixelRatio,
scaled: pixelRatio != 1
};
},
/**
* Show the error box.
* @param {String} message A message that is human readable.
* @param {Object} moreInfo (optional) Further information about the error
*
that is more technical. Should have a 'message'
*
and optionally a 'stack' property.
*/
error: function pdfViewError(message, moreInfo) {
var moreInfoText = mozL10n.get('error_build', {build: PDFJS.build},
'PDF.JS Build: {{build}}') + '\n';
if (moreInfo) {
moreInfoText +=
mozL10n.get('error_message', {message: moreInfo.message},
'Message: {{message}}');
if (moreInfo.stack) {
moreInfoText += '\n' +
mozL10n.get('error_stack', {stack: moreInfo.stack},
'Stack: {{stack}}');
} else {
if (moreInfo.filename) {
moreInfoText += '\n' +

mozL10n.get('error_file', {file: moreInfo.filename},


'File: {{file}}');

}
if (moreInfo.lineNumber) {
moreInfoText += '\n' +
mozL10n.get('error_line', {line: moreInfo.lineNumber},
'Line: {{line}}');
}

var loadingBox = document.getElementById('loadingBox');


loadingBox.setAttribute('hidden', 'true');
console.error(message + '\n' + moreInfoText);
this.fallback();

},

progress: function pdfViewProgress(level) {


var percent = Math.round(level * 100);
PDFView.loadingBar.percent = percent;
},
load: function pdfViewLoad(pdfDocument, scale) {
function bindOnAfterDraw(pageView, thumbnailView) {
// when page is painted, using the image as thumbnail base
pageView.onAfterDraw = function pdfViewLoadOnAfterDraw() {
thumbnailView.setImage(pageView.canvas);
};
}
this.pdfDocument = pdfDocument;
var errorWrapper = document.getElementById('errorWrapper');
errorWrapper.setAttribute('hidden', 'true');
var loadingBox = document.getElementById('loadingBox');
loadingBox.setAttribute('hidden', 'true');
var loadingIndicator = document.getElementById('loading');
loadingIndicator.textContent = '';
var thumbsView = document.getElementById('thumbnailView');
thumbsView.parentNode.scrollTop = 0;
while (thumbsView.hasChildNodes())
thumbsView.removeChild(thumbsView.lastChild);
if ('_loadingInterval' in thumbsView)
clearInterval(thumbsView._loadingInterval);
var container = document.getElementById('viewer');
while (container.hasChildNodes())
container.removeChild(container.lastChild);
var pagesCount = pdfDocument.numPages;
var id = pdfDocument.fingerprint;
document.getElementById('numPages').textContent =
mozL10n.get('page_of', {pageCount: pagesCount}, 'of {{pageCount}}');
document.getElementById('pageNumber').max = pagesCount;

PDFView.documentFingerprint = id;
var store = PDFView.store = new Settings(id);
var storePromise = store.initializedPromise;
this.pageRotation = 0;
var pages = this.pages = [];
this.pageText = [];
this.startedTextExtraction = false;
var pagesRefMap = {};
var thumbnails = this.thumbnails = [];
var pagePromises = [];
for (var i = 1; i <= pagesCount; i++)
pagePromises.push(pdfDocument.getPage(i));
var self = this;
var pagesPromise = PDFJS.Promise.all(pagePromises);
pagesPromise.then(function(promisedPages) {
for (var i = 1; i <= pagesCount; i++) {
var page = promisedPages[i - 1];
var pageView = new PageView(container, page, i, scale,
page.stats, self.navigateTo.bind(self));
var thumbnailView = new ThumbnailView(thumbsView, page, i);
bindOnAfterDraw(pageView, thumbnailView);

pages.push(pageView);
thumbnails.push(thumbnailView);
var pageRef = page.ref;
pagesRefMap[pageRef.num + ' ' + pageRef.gen + ' R'] = i;

self.pagesRefMap = pagesRefMap;
});
var destinationsPromise = pdfDocument.getDestinations();
destinationsPromise.then(function(destinations) {
self.destinations = destinations;
});
// outline and initial view depends on destinations and pagesRefMap
var promises = [pagesPromise, destinationsPromise, storePromise];
PDFJS.Promise.all(promises).then(function() {
pdfDocument.getOutline().then(function(outline) {
self.outline = new DocumentOutlineView(outline);
});
var storedHash = null;
if (store.get('exists', false)) {
var page = store.get('page', '1');
var zoom = store.get('zoom', PDFView.currentScale);
var left = store.get('scrollLeft', '0');
var top = store.get('scrollTop', '0');
}

storedHash = 'page=' + page + '&zoom=' + zoom + ',' + left + ',' + top;

self.setInitialView(storedHash, scale);
});
pdfDocument.getMetadata().then(function(data) {
var info = data.info, metadata = data.metadata;

self.documentInfo = info;
self.metadata = metadata;
var pdfTitle;
if (metadata) {
if (metadata.has('dc:title'))
pdfTitle = metadata.get('dc:title');
}
if (!pdfTitle && info && info['Title'])
pdfTitle = info['Title'];
if (pdfTitle)
document.title = pdfTitle + ' - ' + document.title;
if (info.IsAcroFormPresent) {
// AcroForm/XFA was found
PDFView.fallback();
}
});

},

setInitialView: function pdfViewSetInitialView(storedHash, scale) {


// Reset the current scale, as otherwise the page's scale might not get
// updated if the zoom level stayed the same.
this.currentScale = 0;
this.currentScaleValue = null;
if (this.initialBookmark) {
this.setHash(this.initialBookmark);
this.initialBookmark = null;
}
else if (storedHash)
this.setHash(storedHash);
else if (scale) {
this.parseScale(scale, true);
this.page = 1;
}
if (PDFView.currentScale === UNKNOWN_SCALE) {
// Scale was not initialized: invalid bookmark or scale was not specified.
// Setting the default one.
this.parseScale(DEFAULT_SCALE, true);
}

},

renderHighestPriority: function pdfViewRenderHighestPriority() {


// Pages have a higher priority than thumbnails, so check them first.
var visiblePages = this.getVisiblePages();
var pageView = this.getHighestPriority(visiblePages, this.pages,
this.pageViewScroll.down);
if (pageView) {
this.renderView(pageView, 'page');
return;
}
// No pages needed rendering so check thumbnails.
if (this.sidebarOpen) {
var visibleThumbs = this.getVisibleThumbs();
var thumbView = this.getHighestPriority(visibleThumbs,
this.thumbnails,
this.thumbnailViewScroll.down);

if (thumbView)
this.renderView(thumbView, 'thumbnail');

},

getHighestPriority: function pdfViewGetHighestPriority(visible, views,


scrolledDown) {
// The state has changed figure out which page has the highest priority to
// render next (if any).
// Priority:
// 1 visible pages
// 2 if last scrolled down page after the visible pages
// 2 if last scrolled up page before the visible pages
var visibleViews = visible.views;
var numVisible = visibleViews.length;
if (numVisible === 0) {
return false;
}
for (var i = 0; i < numVisible; ++i) {
var view = visibleViews[i].view;
if (!this.isViewFinished(view))
return view;
}
// All the visible views have rendered, try to render next/previous pages.
if (scrolledDown) {
var nextPageIndex = visible.last.id;
// ID's start at 1 so no need to add 1.
if (views[nextPageIndex] && !this.isViewFinished(views[nextPageIndex]))
return views[nextPageIndex];
} else {
var previousPageIndex = visible.first.id - 2;
if (views[previousPageIndex] &&
!this.isViewFinished(views[previousPageIndex]))
return views[previousPageIndex];
}
// Everything that needs to be rendered has been.
return false;

},

isViewFinished: function pdfViewNeedsRendering(view) {


return view.renderingState === RenderingStates.FINISHED;
},
// Render a page or thumbnail view. This calls the appropriate function based
// on the views state. If the view is already rendered it will return false.
renderView: function pdfViewRender(view, type) {
var state = view.renderingState;
switch (state) {
case RenderingStates.FINISHED:
return false;
case RenderingStates.PAUSED:
PDFView.highestPriorityPage = type + view.id;
view.resume();
break;
case RenderingStates.RUNNING:
PDFView.highestPriorityPage = type + view.id;
break;
case RenderingStates.INITIAL:

PDFView.highestPriorityPage = type + view.id;


view.draw(this.renderHighestPriority.bind(this));
break;

}
return true;

},

setHash: function pdfViewSetHash(hash) {


if (!hash)
return;
if (hash.indexOf('=') >= 0) {
var params = PDFView.parseQueryString(hash);
// borrowing syntax from "Parameters for Opening PDF Files"
if ('nameddest' in params) {
PDFView.navigateTo(params.nameddest);
return;
}
if ('page' in params) {
var pageNumber = (params.page | 0) || 1;
if ('zoom' in params) {
var zoomArgs = params.zoom.split(','); // scale,left,top
// building destination array
// If the zoom value, it has to get divided by 100. If it is a string,
// it should stay as it is.
var zoomArg = zoomArgs[0];
var zoomArgNumber = parseFloat(zoomArg);
if (zoomArgNumber)
zoomArg = zoomArgNumber / 100;
var dest = [null, {name: 'XYZ'}, (zoomArgs[1] | 0),
(zoomArgs[2] | 0), zoomArg];
var currentPage = this.pages[pageNumber - 1];
currentPage.scrollIntoView(dest);
} else {
this.page = pageNumber; // simple page
}

}
} else if (/^\d+$/.test(hash)) // page number
this.page = hash;
else // named destination
PDFView.navigateTo(unescape(hash));

},

switchSidebarView: function pdfViewSwitchSidebarView(view) {


var thumbsView = document.getElementById('thumbnailView');
var outlineView = document.getElementById('outlineView');
var thumbsButton = document.getElementById('viewThumbnail');
var outlineButton = document.getElementById('viewOutline');
switch (view) {
case 'thumbs':
thumbsButton.classList.add('toggled');
outlineButton.classList.remove('toggled');
thumbsView.classList.remove('hidden');
outlineView.classList.add('hidden');
PDFView.renderHighestPriority();

break;
case 'outline':
thumbsButton.classList.remove('toggled');
outlineButton.classList.add('toggled');
thumbsView.classList.add('hidden');
outlineView.classList.remove('hidden');

if (outlineButton.getAttribute('disabled'))
return;
break;

},

getVisiblePages: function pdfViewGetVisiblePages() {


return this.getVisibleElements(this.container,
this.pages, true);
},
getVisibleThumbs: function pdfViewGetVisibleThumbs() {
return this.getVisibleElements(this.thumbnailContainer,
this.thumbnails);
},
// Generic helper to find out what elements are visible within a scroll pane.
getVisibleElements: function pdfViewGetVisibleElements(
scrollEl, views, sortByVisibility) {
var currentHeight = 0, view;
var top = scrollEl.scrollTop;
for (var i = 1, ii = views.length; i <= ii; ++i) {
view = views[i - 1];
currentHeight = view.el.offsetTop;
if (currentHeight + view.el.clientHeight > top)
break;
currentHeight += view.el.clientHeight;
}
var visible = [];
// Algorithm broken in fullscreen mode
if (this.isFullscreen) {
var currentPage = this.pages[this.page - 1];
visible.push({
id: currentPage.id,
view: currentPage
});
}

return { first: currentPage, last: currentPage, views: visible};

var bottom = top + scrollEl.clientHeight;


var nextHeight, hidden, percent, viewHeight;
for (; i <= ii && currentHeight < bottom; ++i) {
view = views[i - 1];
viewHeight = view.el.clientHeight;
currentHeight = view.el.offsetTop;
nextHeight = currentHeight + viewHeight;
hidden = Math.max(0, top - currentHeight) +
Math.max(0, nextHeight - bottom);

percent = Math.floor((viewHeight - hidden) * 100.0 / viewHeight);


visible.push({ id: view.id, y: currentHeight,
view: view, percent: percent });
currentHeight = nextHeight;

var first = visible[0];


var last = visible[visible.length - 1];
if (sortByVisibility) {
visible.sort(function(a, b) {
var pc = a.percent - b.percent;
if (Math.abs(pc) > 0.001)
return -pc;

return a.id - b.id; // ensure stability


});

return {first: first, last: last, views: visible};

},

// Helper function to parse query string (e.g. ?param1=value&parm2=...).


parseQueryString: function pdfViewParseQueryString(query) {
var parts = query.split('&');
var params = {};
for (var i = 0, ii = parts.length; i < parts.length; ++i) {
var param = parts[i].split('=');
var key = param[0];
var value = param.length > 1 ? param[1] : null;
params[unescape(key)] = unescape(value);
}
return params;
},
beforePrint: function pdfViewSetupBeforePrint() {
if (!this.supportsPrinting) {
var printMessage = mozL10n.get('printing_not_supported', null,
'Warning: Printing is not fully supported by this browser.');
this.error(printMessage);
return;
}
var body = document.querySelector('body');
body.setAttribute('data-mozPrintCallback', true);
for (var i = 0, ii = this.pages.length; i < ii; ++i) {
this.pages[i].beforePrint();
}
},
afterPrint: function pdfViewSetupAfterPrint() {
var div = document.getElementById('printContainer');
while (div.hasChildNodes())
div.removeChild(div.lastChild);
},
fullscreen: function pdfViewFullscreen() {
var isFullscreen = document.fullscreenElement || document.mozFullScreen ||
document.webkitIsFullScreen;
if (isFullscreen) {

return false;

var wrapper = document.getElementById('viewerContainer');


if (document.documentElement.requestFullscreen) {
wrapper.requestFullscreen();
} else if (document.documentElement.mozRequestFullScreen) {
wrapper.mozRequestFullScreen();
} else if (document.documentElement.webkitRequestFullScreen) {
wrapper.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
} else {
return false;
}
this.isFullscreen = true;
var currentPage = this.pages[this.page - 1];
this.previousScale = this.currentScaleValue;
this.parseScale('page-fit', true);
// Wait for fullscreen to take effect
setTimeout(function() {
currentPage.scrollIntoView();
}, 0);
this.showPresentationControls();
return true;

},

exitFullscreen: function pdfViewExitFullscreen() {


this.isFullscreen = false;
this.parseScale(this.previousScale);
this.page = this.page;
this.clearMouseScrollState();
this.hidePresentationControls();
},
showPresentationControls: function pdfViewShowPresentationControls() {
var DELAY_BEFORE_HIDING_CONTROLS = 3000;
var wrapper = document.getElementById('viewerContainer');
if (this.presentationControlsTimeout) {
clearTimeout(this.presentationControlsTimeout);
} else {
wrapper.classList.add('presentationControls');
}
this.presentationControlsTimeout = setTimeout(function hideControls() {
wrapper.classList.remove('presentationControls');
delete PDFView.presentationControlsTimeout;
}, DELAY_BEFORE_HIDING_CONTROLS);
},
hidePresentationControls: function pdfViewShowPresentationControls() {
if (!this.presentationControlsTimeout) {
return;
}
clearTimeout(this.presentationControlsTimeout);
delete this.presentationControlsTimeout;

},

var wrapper = document.getElementById('viewerContainer');


wrapper.classList.remove('presentationControls');

rotatePages: function pdfViewPageRotation(delta) {


this.pageRotation = (this.pageRotation + 360 + delta) % 360;
for (var i = 0, l = this.pages.length; i < l; i++) {
var page = this.pages[i];
page.update(page.scale, this.pageRotation);
}
for (var i = 0, l = this.thumbnails.length; i < l; i++) {
var thumb = this.thumbnails[i];
thumb.updateRotation(this.pageRotation);
}
var currentPage = this.pages[this.page - 1];
this.parseScale(this.currentScaleValue, true);
this.renderHighestPriority();
// Wait for fullscreen to take effect
setTimeout(function() {
currentPage.scrollIntoView();
}, 0);

},

/**
* This function flips the page in presentation mode if the user scrolls up
* or down with large enough motion and prevents page flipping too often.
*
* @this {PDFView}
* @param {number} mouseScrollDelta The delta value from the mouse event.
*/
mouseScroll: function pdfViewMouseScroll(mouseScrollDelta) {
var MOUSE_SCROLL_COOLDOWN_TIME = 50;
var currentTime = (new Date()).getTime();
var storedTime = this.mouseScrollTimeStamp;
// In case one page has already been flipped there is a cooldown time
// which has to expire before next page can be scrolled on to.
if (currentTime > storedTime &&
currentTime - storedTime < MOUSE_SCROLL_COOLDOWN_TIME)
return;
// In case the user decides to scroll to the opposite direction than before
// clear the accumulated delta.
if ((this.mouseScrollDelta > 0 && mouseScrollDelta < 0) ||
(this.mouseScrollDelta < 0 && mouseScrollDelta > 0))
this.clearMouseScrollState();
this.mouseScrollDelta += mouseScrollDelta;
var PAGE_FLIP_THRESHOLD = 120;
if (Math.abs(this.mouseScrollDelta) >= PAGE_FLIP_THRESHOLD) {
var PageFlipDirection = {
UP: -1,
DOWN: 1

};
// In fullscreen mode scroll one page at a time.
var pageFlipDirection = (this.mouseScrollDelta > 0) ?
PageFlipDirection.UP :
PageFlipDirection.DOWN;
this.clearMouseScrollState();
var currentPage = this.page;
// In case we are already on the first or the last page there is no need
// to do anything.
if ((currentPage == 1 && pageFlipDirection == PageFlipDirection.UP) ||
(currentPage == this.pages.length &&
pageFlipDirection == PageFlipDirection.DOWN))
return;

this.page += pageFlipDirection;
this.mouseScrollTimeStamp = currentTime;

},

/**
* This function clears the member attributes used with mouse scrolling in
* presentation mode.
*
* @this {PDFView}
*/
clearMouseScrollState: function pdfViewClearMouseScrollState() {
this.mouseScrollTimeStamp = 0;
this.mouseScrollDelta = 0;
}

};

var PageView = function pageView(container, pdfPage, id, scale,


stats, navigateTo) {
this.id = id;
this.pdfPage = pdfPage;
this.rotation = 0;
this.scale = scale || 1.0;
this.viewport = this.pdfPage.getViewport(this.scale, this.pdfPage.rotate);
this.renderingState = RenderingStates.INITIAL;
this.resume = null;
this.textContent = null;
this.textLayer = null;
var anchor = document.createElement('a');
anchor.name = '' + this.id;
var div = this.el = document.createElement('div');
div.id = 'pageContainer' + this.id;
div.className = 'page';
div.style.width = Math.floor(this.viewport.width) + 'px';
div.style.height = Math.floor(this.viewport.height) + 'px';
container.appendChild(anchor);
container.appendChild(div);

this.destroy = function pageViewDestroy() {


this.update();
this.pdfPage.destroy();
};
this.update = function pageViewUpdate(scale, rotation) {
this.renderingState = RenderingStates.INITIAL;
this.resume = null;
if (typeof rotation !== 'undefined') {
this.rotation = rotation;
}
this.scale = scale || this.scale;
var totalRotation = (this.rotation + this.pdfPage.rotate) % 360;
var viewport = this.pdfPage.getViewport(this.scale, totalRotation);
this.viewport = viewport;
div.style.width = Math.floor(viewport.width) + 'px';
div.style.height = Math.floor(viewport.height) + 'px';
while (div.hasChildNodes())
div.removeChild(div.lastChild);
div.removeAttribute('data-loaded');
delete this.canvas;
this.loadingIconDiv = document.createElement('div');
this.loadingIconDiv.className = 'loadingIcon';
div.appendChild(this.loadingIconDiv);

};

Object.defineProperty(this, 'width', {
get: function PageView_getWidth() {
return this.viewport.width;
},
enumerable: true
});
Object.defineProperty(this, 'height', {
get: function PageView_getHeight() {
return this.viewport.height;
},
enumerable: true
});
function setupAnnotations(pdfPage, viewport) {
function bindLink(link, dest) {
link.href = PDFView.getDestinationHash(dest);
link.onclick = function pageViewSetupLinksOnclick() {
if (dest)
PDFView.navigateTo(dest);
return false;
};
}
function createElementWithStyle(tagName, item, rect) {
if (!rect) {
rect = viewport.convertToViewportRectangle(item.rect);
rect = PDFJS.Util.normalizeRect(rect);

}
var element = document.createElement(tagName);
element.style.left = Math.floor(rect[0]) + 'px';
element.style.top = Math.floor(rect[1]) + 'px';
element.style.width = Math.ceil(rect[2] - rect[0]) + 'px';
element.style.height = Math.ceil(rect[3] - rect[1]) + 'px';
return element;

}
function createTextAnnotation(item) {
var container = document.createElement('section');
container.className = 'annotText';

var rect = viewport.convertToViewportRectangle(item.rect);


rect = PDFJS.Util.normalizeRect(rect);
// sanity check because of OOo-generated PDFs
if ((rect[3] - rect[1]) < ANNOT_MIN_SIZE) {
rect[3] = rect[1] + ANNOT_MIN_SIZE;
}
if ((rect[2] - rect[0]) < ANNOT_MIN_SIZE) {
rect[2] = rect[0] + (rect[3] - rect[1]); // make it square
}
var image = createElementWithStyle('img', item, rect);
var iconName = item.name;
image.src = IMAGE_DIR + 'annotation-' +
iconName.toLowerCase() + '.svg';
image.alt = mozL10n.get('text_annotation_type', {type: iconName},
'[{{type}} Annotation]');
var content = document.createElement('div');
content.setAttribute('hidden', true);
var title = document.createElement('h1');
var text = document.createElement('p');
content.style.left = Math.floor(rect[2]) + 'px';
content.style.top = Math.floor(rect[1]) + 'px';
title.textContent = item.title;
if (!item.content && !item.title) {
content.setAttribute('hidden', true);
} else {
var e = document.createElement('span');
var lines = item.content.split(/(?:\r\n?|\n)/);
for (var i = 0, ii = lines.length; i < ii; ++i) {
var line = lines[i];
e.appendChild(document.createTextNode(line));
if (i < (ii - 1))
e.appendChild(document.createElement('br'));
}
text.appendChild(e);
image.addEventListener('mouseover', function annotationImageOver() {
content.removeAttribute('hidden');
}, false);

image.addEventListener('mouseout', function annotationImageOut() {


content.setAttribute('hidden', true);
}, false);

content.appendChild(title);
content.appendChild(text);
container.appendChild(image);
container.appendChild(content);

return container;

pdfPage.getAnnotations().then(function(items) {
for (var i = 0; i < items.length; i++) {
var item = items[i];
switch (item.type) {
case 'Link':
var link = createElementWithStyle('a', item);
link.href = item.url || '';
if (!item.url)
bindLink(link, ('dest' in item) ? item.dest : null);
div.appendChild(link);
break;
case 'Text':
var textAnnotation = createTextAnnotation(item);
if (textAnnotation)
div.appendChild(textAnnotation);
break;
}
}
});

this.getPagePoint = function pageViewGetPagePoint(x, y) {


return this.viewport.convertToPdfPoint(x, y);
};
this.scrollIntoView = function pageViewScrollIntoView(dest) {
if (!dest) {
scrollIntoView(div);
return;
}
var x = 0, y = 0;
var width = 0, height = 0, widthScale, heightScale;
var scale = 0;
switch (dest[1].name) {
case 'XYZ':
x = dest[2];
y = dest[3];
scale = dest[4];
break;
case 'Fit':
case 'FitB':
scale = 'page-fit';
break;
case 'FitH':
case 'FitBH':
y = dest[2];
scale = 'page-width';
break;
case 'FitV':
case 'FitBV':
x = dest[2];
scale = 'page-height';
break;
case 'FitR':
x = dest[2];

y = dest[3];
width = dest[4] - x;
height = dest[5] - y;
widthScale = (this.container.clientWidth - SCROLLBAR_PADDING) /
width / CSS_UNITS;
heightScale = (this.container.clientHeight - SCROLLBAR_PADDING) /
height / CSS_UNITS;
scale = Math.min(widthScale, heightScale);
break;
default:
return;

if (scale && scale !== PDFView.currentScale)


PDFView.parseScale(scale, true, true);
else if (PDFView.currentScale === UNKNOWN_SCALE)
PDFView.parseScale(DEFAULT_SCALE, true, true);
var boundingRect = [
this.viewport.convertToViewportPoint(x, y),
this.viewport.convertToViewportPoint(x + width, y + height)
];
setTimeout(function pageViewScrollIntoViewRelayout() {
// letting page to re-layout before scrolling
var scale = PDFView.currentScale;
var x = Math.min(boundingRect[0][0], boundingRect[1][0]);
var y = Math.min(boundingRect[0][1], boundingRect[1][1]);
var width = Math.abs(boundingRect[0][0] - boundingRect[1][0]);
var height = Math.abs(boundingRect[0][1] - boundingRect[1][1]);

};

scrollIntoView(div, {left: x, top: y, width: width, height: height});


}, 0);

this.getTextContent = function pageviewGetTextContent() {


if (!this.textContent) {
this.textContent = this.pdfPage.getTextContent();
}
return this.textContent;
};
this.draw = function pageviewDraw(callback) {
if (this.renderingState !== RenderingStates.INITIAL)
error('Must be in new state before drawing');
this.renderingState = RenderingStates.RUNNING;
var canvas = document.createElement('canvas');
canvas.id = 'page' + this.id;
canvas.mozOpaque = true;
div.appendChild(canvas);
this.canvas = canvas;
var textLayerDiv = null;
if (!PDFJS.disableTextLayer) {
textLayerDiv = document.createElement('div');
textLayerDiv.className = 'textLayer';
div.appendChild(textLayerDiv);
}
var textLayer = this.textLayer =

textLayerDiv ? new TextLayerBuilder(textLayerDiv, this.id - 1) : null;


var scale = this.scale, viewport = this.viewport;
var outputScale = PDFView.getOutputScale();
canvas.width = Math.floor(viewport.width) * outputScale.sx;
canvas.height = Math.floor(viewport.height) * outputScale.sy;
if (outputScale.scaled) {
var cssScale = 'scale(' + (1 / outputScale.sx) + ', ' +
(1 / outputScale.sy) + ')';
CustomStyle.setProp('transform' , canvas, cssScale);
CustomStyle.setProp('transformOrigin' , canvas, '0% 0%');
if (textLayerDiv) {
CustomStyle.setProp('transform' , textLayerDiv, cssScale);
CustomStyle.setProp('transformOrigin' , textLayerDiv, '0% 0%');
}
}
var ctx = canvas.getContext('2d');
ctx.save();
ctx.fillStyle = 'rgb(255, 255, 255)';
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.restore();
if (outputScale.scaled) {
ctx.scale(outputScale.sx, outputScale.sy);
}
// Rendering area
var self = this;
function pageViewDrawCallback(error) {
self.renderingState = RenderingStates.FINISHED;
if (self.loadingIconDiv) {
div.removeChild(self.loadingIconDiv);
delete self.loadingIconDiv;
}
if (error) {
PDFView.error(mozL10n.get('rendering_error', null,
'An error occurred while rendering the page.'), error);
}
self.stats = pdfPage.stats;
self.updateStats();
if (self.onAfterDraw)
self.onAfterDraw();

cache.push(self);
callback();

var renderContext = {
canvasContext: ctx,
viewport: this.viewport,
textLayer: textLayer,
continueCallback: function pdfViewcContinueCallback(cont) {
if (PDFView.highestPriorityPage !== 'page' + self.id) {
self.renderingState = RenderingStates.PAUSED;
self.resume = function resumeCallback() {

self.renderingState = RenderingStates.RUNNING;
cont();

};
return;

}
cont();

}
};
this.pdfPage.render(renderContext).then(
function pdfPageRenderCallback() {
pageViewDrawCallback(null);
},
function pdfPageRenderError(error) {
pageViewDrawCallback(error);
}
);
if (textLayer) {
this.getTextContent().then(
function textContentResolved(textContent) {
textLayer.setTextContent(textContent);
}
);
}
setupAnnotations(this.pdfPage, this.viewport);
div.setAttribute('data-loaded', true);

};

this.beforePrint = function pageViewBeforePrint() {


var pdfPage = this.pdfPage;
var viewport = pdfPage.getViewport(1);
// Use the same hack we use for high dpi displays for printing to get better
// output until bug 811002 is fixed in FF.
var PRINT_OUTPUT_SCALE = 2;
var canvas = this.canvas = document.createElement('canvas');
canvas.width = Math.floor(viewport.width) * PRINT_OUTPUT_SCALE;
canvas.height = Math.floor(viewport.height) * PRINT_OUTPUT_SCALE;
canvas.style.width = (PRINT_OUTPUT_SCALE * viewport.width) + 'pt';
canvas.style.height = (PRINT_OUTPUT_SCALE * viewport.height) + 'pt';
var cssScale = 'scale(' + (1 / PRINT_OUTPUT_SCALE) + ', ' +
(1 / PRINT_OUTPUT_SCALE) + ')';
CustomStyle.setProp('transform' , canvas, cssScale);
CustomStyle.setProp('transformOrigin' , canvas, '0% 0%');
var printContainer = document.getElementById('printContainer');
printContainer.appendChild(canvas);
var self = this;
canvas.mozPrintCallback = function(obj) {
var ctx = obj.context;
ctx.save();
ctx.fillStyle = 'rgb(255, 255, 255)';
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.restore();
ctx.scale(PRINT_OUTPUT_SCALE, PRINT_OUTPUT_SCALE);
var renderContext = {
canvasContext: ctx,

viewport: viewport

};

pdfPage.render(renderContext).then(function() {
// Tell the printEngine that rendering this canvas/page has finished.
obj.done();
self.pdfPage.destroy();
}, function(error) {
console.error(error);
// Tell the printEngine that rendering this canvas/page has failed.
// This will make the print proces stop.
if ('abort' in object)
obj.abort();
else
obj.done();
self.pdfPage.destroy();
});

};

};

this.updateStats = function pageViewUpdateStats() {


if (PDFJS.pdfBug && Stats.enabled) {
var stats = this.stats;
Stats.add(this.id, stats);
}
};

};

var ThumbnailView = function thumbnailView(container, pdfPage, id) {


var anchor = document.createElement('a');
anchor.href = PDFView.getAnchorUrl('#page=' + id);
anchor.title = mozL10n.get('thumb_page_title', {page: id}, 'Page {{page}}');
anchor.onclick = function stopNavigation() {
PDFView.page = id;
return false;
};
var rotation = 0;
var totalRotation = (rotation + pdfPage.rotate) % 360;
var viewport = pdfPage.getViewport(1, totalRotation);
var pageWidth = this.width = viewport.width;
var pageHeight = this.height = viewport.height;
var pageRatio = pageWidth / pageHeight;
this.id = id;
var
var
var
var

canvasWidth = 98;
canvasHeight = canvasWidth / this.width * this.height;
scaleX = this.scaleX = (canvasWidth / pageWidth);
scaleY = this.scaleY = (canvasHeight / pageHeight);

var div = this.el = document.createElement('div');


div.id = 'thumbnailContainer' + id;
div.className = 'thumbnail';
var ring = document.createElement('div');
ring.className = 'thumbnailSelectionRing';
ring.style.width = canvasWidth + 'px';
ring.style.height = canvasHeight + 'px';
div.appendChild(ring);

anchor.appendChild(div);
container.appendChild(anchor);
this.hasImage = false;
this.renderingState = RenderingStates.INITIAL;
this.updateRotation = function(rot) {
rotation = rot;
totalRotation = (rotation + pdfPage.rotate) % 360;
viewport = pdfPage.getViewport(1, totalRotation);
pageWidth = this.width = viewport.width;
pageHeight = this.height = viewport.height;
pageRatio = pageWidth / pageHeight;
canvasHeight = canvasWidth / this.width * this.height;
scaleX = this.scaleX = (canvasWidth / pageWidth);
scaleY = this.scaleY = (canvasHeight / pageHeight);
div.removeAttribute('data-loaded');
ring.textContent = '';
ring.style.width = canvasWidth + 'px';
ring.style.height = canvasHeight + 'px';

this.hasImage = false;
this.renderingState = RenderingStates.INITIAL;
this.resume = null;

function getPageDrawContext() {
var canvas = document.createElement('canvas');
canvas.id = 'thumbnail' + id;
canvas.mozOpaque = true;
canvas.width = canvasWidth;
canvas.height = canvasHeight;
canvas.className = 'thumbnailImage';
canvas.setAttribute('aria-label', mozL10n.get('thumb_page_canvas',
{page: id}, 'Thumbnail of Page {{page}}'));
div.setAttribute('data-loaded', true);
ring.appendChild(canvas);

var ctx = canvas.getContext('2d');


ctx.save();
ctx.fillStyle = 'rgb(255, 255, 255)';
ctx.fillRect(0, 0, canvasWidth, canvasHeight);
ctx.restore();
return ctx;

this.drawingRequired = function thumbnailViewDrawingRequired() {


return !this.hasImage;
};
this.draw = function thumbnailViewDraw(callback) {
if (this.renderingState !== RenderingStates.INITIAL)
error('Must be in new state before drawing');

this.renderingState = RenderingStates.RUNNING;
if (this.hasImage) {
callback();
return;
}
var self = this;
var ctx = getPageDrawContext();
var drawViewport = pdfPage.getViewport(scaleX, totalRotation);
var renderContext = {
canvasContext: ctx,
viewport: drawViewport,
continueCallback: function(cont) {
if (PDFView.highestPriorityPage !== 'thumbnail' + self.id) {
self.renderingState = RenderingStates.PAUSED;
self.resume = function() {
self.renderingState = RenderingStates.RUNNING;
cont();
};
return;
}
cont();
}
};
pdfPage.render(renderContext).then(
function pdfPageRenderCallback() {
self.renderingState = RenderingStates.FINISHED;
callback();
},
function pdfPageRenderError(error) {
self.renderingState = RenderingStates.FINISHED;
callback();
}
);
this.hasImage = true;

};

this.setImage = function thumbnailViewSetImage(img) {


if (this.hasImage || !img)
return;
this.renderingState = RenderingStates.FINISHED;
var ctx = getPageDrawContext();
ctx.drawImage(img, 0, 0, img.width, img.height,
0, 0, ctx.canvas.width, ctx.canvas.height);
this.hasImage = true;

};

};

var DocumentOutlineView = function documentOutlineView(outline) {


var outlineView = document.getElementById('outlineView');
while (outlineView.firstChild)
outlineView.removeChild(outlineView.firstChild);
function bindItemLink(domObj, item) {
domObj.href = PDFView.getDestinationHash(item.dest);
domObj.onclick = function documentOutlineViewOnclick(e) {
PDFView.navigateTo(item.dest);
return false;
};

}
if (!outline) {
var noOutline = document.createElement('div');
noOutline.classList.add('noOutline');
noOutline.textContent = mozL10n.get('no_outline', null,
'No Outline Available');
outlineView.appendChild(noOutline);
return;
}
var queue = [{parent: outlineView, items: outline}];
while (queue.length > 0) {
var levelData = queue.shift();
var i, n = levelData.items.length;
for (i = 0; i < n; i++) {
var item = levelData.items[i];
var div = document.createElement('div');
div.className = 'outlineItem';
var a = document.createElement('a');
bindItemLink(a, item);
a.textContent = item.title;
div.appendChild(a);
if (item.items.length > 0) {
var itemsDiv = document.createElement('div');
itemsDiv.className = 'outlineItems';
div.appendChild(itemsDiv);
queue.push({parent: itemsDiv, items: item.items});
}

levelData.parent.appendChild(div);

};

// optimised CSS custom property getter/setter


var CustomStyle = (function CustomStyleClosure() {
// As noted on: http://www.zachstronaut.com/posts/2009/02/17/
//
animate-css-transforms-firefox-webkit.html
// in some versions of IE9 it is critical that ms appear in this list
// before Moz
var prefixes = ['ms', 'Moz', 'Webkit', 'O'];
var _cache = { };
function CustomStyle() {
}
CustomStyle.getProp = function get(propName, element) {
// check cache only when no element is given
if (arguments.length == 1 && typeof _cache[propName] == 'string') {
return _cache[propName];
}
element = element || document.documentElement;
var style = element.style, prefixed, uPropName;
// test standard property first
if (typeof style[propName] == 'string') {

return (_cache[propName] = propName);

// capitalize
uPropName = propName.charAt(0).toUpperCase() + propName.slice(1);
// test vendor specific properties
for (var i = 0, l = prefixes.length; i < l; i++) {
prefixed = prefixes[i] + uPropName;
if (typeof style[prefixed] == 'string') {
return (_cache[propName] = prefixed);
}
}
//if all fails then set to undefined
return (_cache[propName] = 'undefined');

};

CustomStyle.setProp = function set(propName, element, str) {


var prop = this.getProp(propName);
if (prop != 'undefined')
element.style[prop] = str;
};
return CustomStyle;
})();
var TextLayerBuilder = function textLayerBuilder(textLayerDiv, pageIdx) {
var textLayerFrag = document.createDocumentFragment();
this.textLayerDiv = textLayerDiv;
this.layoutDone = false;
this.divContentDone = false;
this.pageIdx = pageIdx;
this.matches = [];
this.beginLayout = function textLayerBuilderBeginLayout() {
this.textDivs = [];
this.textLayerQueue = [];
this.renderingDone = false;
};
this.endLayout = function textLayerBuilderEndLayout() {
this.layoutDone = true;
this.insertDivContent();
};
this.renderLayer = function textLayerBuilderRenderLayer() {
var self = this;
var textDivs = this.textDivs;
var textLayerDiv = this.textLayerDiv;
var canvas = document.createElement('canvas');
var ctx = canvas.getContext('2d');
// No point in rendering so many divs as it'd make the browser unusable
// even after the divs are rendered
var MAX_TEXT_DIVS_TO_RENDER = 100000;
if (textDivs.length > MAX_TEXT_DIVS_TO_RENDER)
return;

for (var i = 0, ii = textDivs.length; i < ii; i++) {


var textDiv = textDivs[i];
textLayerFrag.appendChild(textDiv);
ctx.font = textDiv.style.fontSize + ' ' + textDiv.style.fontFamily;
var width = ctx.measureText(textDiv.textContent).width;
if (width > 0) {
var textScale = textDiv.dataset.canvasWidth / width;
CustomStyle.setProp('transform' , textDiv,
'scale(' + textScale + ', 1)');
CustomStyle.setProp('transformOrigin' , textDiv, '0% 0%');

textLayerDiv.appendChild(textDiv);

this.renderingDone = true;
this.updateMatches();
textLayerDiv.appendChild(textLayerFrag);

};

this.setupRenderLayoutTimer = function textLayerSetupRenderLayoutTimer() {


// Schedule renderLayout() if user has been scrolling, otherwise
// run it right away
var RENDER_DELAY = 200; // in ms
var self = this;
if (Date.now() - PDFView.lastScroll > RENDER_DELAY) {
// Render right away
this.renderLayer();
} else {
// Schedule
if (this.renderTimer)
clearTimeout(this.renderTimer);
this.renderTimer = setTimeout(function() {
self.setupRenderLayoutTimer();
}, RENDER_DELAY);
}
};
this.appendText = function textLayerBuilderAppendText(geom) {
var textDiv = document.createElement('div');
// vScale and hScale already contain the scaling to pixel units
var fontHeight = geom.fontSize * geom.vScale;
textDiv.dataset.canvasWidth = geom.canvasWidth * geom.hScale;
textDiv.dataset.fontName = geom.fontName;
textDiv.style.fontSize = fontHeight + 'px';
textDiv.style.fontFamily = geom.fontFamily;
textDiv.style.left = geom.x + 'px';
textDiv.style.top = (geom.y - fontHeight) + 'px';
// The content of the div is set in the `setTextContent` function.
this.textDivs.push(textDiv);

};

this.insertDivContent = function textLayerUpdateTextContent() {


// Only set the content of the divs once layout has finished, the content
// for the divs is available and content is not yet set on the divs.
if (!this.layoutDone || this.divContentDone || !this.textContent)
return;
this.divContentDone = true;
var textDivs = this.textDivs;
var bidiTexts = this.textContent.bidiTexts;
for (var i = 0; i < bidiTexts.length; i++) {
var bidiText = bidiTexts[i];
var textDiv = textDivs[i];

textDiv.textContent = bidiText.str;
textDiv.dir = bidiText.ltr ? 'ltr' : 'rtl';

this.setupRenderLayoutTimer();

};

this.setTextContent = function textLayerBuilderSetTextContent(textContent) {


this.textContent = textContent;
this.insertDivContent();
};
this.convertMatches = function textLayerBuilderConvertMatches(matches) {
var i = 0;
var iIndex = 0;
var bidiTexts = this.textContent.bidiTexts;
var end = bidiTexts.length - 1;
var queryLen = PDFFindController.state.query.length;
var lastDivIdx = -1;
var pos;
var ret = [];
// Loop over all the matches.
for (var m = 0; m < matches.length; m++) {
var matchIdx = matches[m];
// # Calculate the begin position.
// Loop over the divIdxs.
while (i !== end && matchIdx >= (iIndex + bidiTexts[i].str.length)) {
iIndex += bidiTexts[i].str.length;
i++;
}
// TODO: Do proper handling here if something goes wrong.
if (i == bidiTexts.length) {
console.error('Could not find matching mapping');
}
var match = {
begin: {
divIdx: i,
offset: matchIdx - iIndex
}

};
// # Calculate the end position.
matchIdx += queryLen;
// Somewhat same array as above, but use a > instead of >= to get the end
// position right.
while (i !== end && matchIdx > (iIndex + bidiTexts[i].str.length)) {
iIndex += bidiTexts[i].str.length;
i++;
}

match.end = {
divIdx: i,
offset: matchIdx - iIndex
};
ret.push(match);

return ret;

};

this.renderMatches = function textLayerBuilder_renderMatches(matches) {


// Early exit if there is nothing to render.
if (matches.length === 0) {
return;
}
var
var
var
var
var
var

bidiTexts = this.textContent.bidiTexts;
textDivs = this.textDivs;
prevEnd = null;
isSelectedPage = this.pageIdx === PDFFindController.selected.pageIdx;
selectedMatchIdx = PDFFindController.selected.matchIdx;
highlightAll = PDFFindController.state.highlightAll;

var infty = {
divIdx: -1,
offset: undefined
};
function beginText(begin, className) {
var divIdx = begin.divIdx;
var div = textDivs[divIdx];
div.textContent = '';

var content = bidiTexts[divIdx].str.substring(0, begin.offset);


var node = document.createTextNode(content);
if (className) {
var isSelected = isSelectedPage &&
divIdx === selectedMatchIdx;
var span = document.createElement('span');
span.className = className + (isSelected ? ' selected' : '');
span.appendChild(node);
div.appendChild(span);
return;
}
div.appendChild(node);

function appendText(from, to, className) {

var divIdx = from.divIdx;


var div = textDivs[divIdx];

var content = bidiTexts[divIdx].str.substring(from.offset, to.offset);


var node = document.createTextNode(content);
if (className) {
var span = document.createElement('span');
span.className = className;
span.appendChild(node);
div.appendChild(span);
return;
}
div.appendChild(node);

function highlightDiv(divIdx, className) {


textDivs[divIdx].className = className;
}
var i0 = selectedMatchIdx, i1 = i0 + 1, i;
if (highlightAll) {
i0 = 0;
i1 = matches.length;
} else if (!isSelectedPage) {
// Not highlighting all and this isn't the selected page, so do nothing.
return;
}
for (i = i0; i < i1; i++) {
var match = matches[i];
var begin = match.begin;
var end = match.end;
var isSelected = isSelectedPage && i === selectedMatchIdx;
var highlightSuffix = (isSelected ? ' selected' : '');
if (isSelected)
scrollIntoView(textDivs[begin.divIdx], {top: -50});
// Match inside new div.
if (!prevEnd || begin.divIdx !== prevEnd.divIdx) {
// If there was a previous div, then add the text at the end
if (prevEnd !== null) {
appendText(prevEnd, infty);
}
// clears the divs and set the content until the begin point.
beginText(begin);
} else {
appendText(prevEnd, begin);
}
if (begin.divIdx === end.divIdx) {
appendText(begin, end, 'highlight' + highlightSuffix);
} else {
appendText(begin, infty, 'highlight begin' + highlightSuffix);
for (var n = begin.divIdx + 1; n < end.divIdx; n++) {
highlightDiv(n, 'highlight middle' + highlightSuffix);
}
beginText(end, 'highlight end' + highlightSuffix);
}

prevEnd = end;

if (prevEnd) {
appendText(prevEnd, infty);
}

};

this.updateMatches = function textLayerUpdateMatches() {


// Only show matches, once all rendering is done.
if (!this.renderingDone)
return;
// Clear out all matches.
var matches = this.matches;
var textDivs = this.textDivs;
var bidiTexts = this.textContent.bidiTexts;
var clearedUntilDivIdx = -1;
// Clear out all current matches.
for (var i = 0; i < matches.length; i++) {
var match = matches[i];
var begin = Math.max(clearedUntilDivIdx, match.begin.divIdx);
for (var n = begin; n <= match.end.divIdx; n++) {
var div = textDivs[n];
div.textContent = bidiTexts[n].str;
div.className = '';
}
clearedUntilDivIdx = match.end.divIdx + 1;
}
if (!PDFFindController.active)
return;
// Convert the matches on the page controller into the match format used
// for the textLayer.
this.matches = matches =
this.convertMatches(PDFFindController.pageMatches[this.pageIdx] || []);
this.renderMatches(this.matches);

};

};

document.addEventListener('DOMContentLoaded', function webViewerLoad(evt) {


PDFView.initialize();
var params = PDFView.parseQueryString(document.location.search.substring(1));
var file = window.location.toString()
document.getElementById('openFile').setAttribute('hidden', 'true');
// Special debugging flags in the hash section of the URL.
var hash = document.location.hash.substring(1);
var hashParams = PDFView.parseQueryString(hash);
if ('disableWorker' in hashParams)
PDFJS.disableWorker = (hashParams['disableWorker'] === 'true');
if ('textLayer' in hashParams) {

switch (hashParams['textLayer']) {
case 'off':
PDFJS.disableTextLayer = true;
break;
case 'visible':
case 'shadow':
case 'hover':
var viewer = document.getElementById('viewer');
viewer.classList.add('textLayer-' + hashParams['textLayer']);
break;
}

if ('pdfBug' in hashParams && FirefoxCom.requestSync('pdfBugEnabled')) {


PDFJS.pdfBug = true;
var pdfBug = hashParams['pdfBug'];
var enabled = pdfBug.split(',');
PDFBug.enable(enabled);
PDFBug.init();
}
if (!PDFView.supportsPrinting) {
document.getElementById('print').classList.add('hidden');
}
if (!PDFView.supportsFullscreen) {
document.getElementById('fullscreen').classList.add('hidden');
}
if (PDFView.supportsIntegratedFind) {
document.querySelector('#viewFind').classList.add('hidden');
}
// Listen for warnings to trigger the fallback UI. Errors should be caught
// and call PDFView.error() so we don't need to listen for those.
PDFJS.LogManager.addLogger({
warn: function() {
PDFView.fallback();
}
});
var mainContainer = document.getElementById('mainContainer');
var outerContainer = document.getElementById('outerContainer');
mainContainer.addEventListener('transitionend', function(e) {
if (e.target == mainContainer) {
var event = document.createEvent('UIEvents');
event.initUIEvent('resize', false, false, window, 0);
window.dispatchEvent(event);
outerContainer.classList.remove('sidebarMoving');
}
}, true);
document.getElementById('sidebarToggle').addEventListener('click',
function() {
this.classList.toggle('toggled');
outerContainer.classList.add('sidebarMoving');
outerContainer.classList.toggle('sidebarOpen');
PDFView.sidebarOpen = outerContainer.classList.contains('sidebarOpen');
PDFView.renderHighestPriority();
});

document.getElementById('viewThumbnail').addEventListener('click',
function() {
PDFView.switchSidebarView('thumbs');
});
document.getElementById('viewOutline').addEventListener('click',
function() {
PDFView.switchSidebarView('outline');
});
document.getElementById('previous').addEventListener('click',
function() {
PDFView.page--;
});
document.getElementById('next').addEventListener('click',
function() {
PDFView.page++;
});
document.querySelector('.zoomIn').addEventListener('click',
function() {
PDFView.zoomIn();
});
document.querySelector('.zoomOut').addEventListener('click',
function() {
PDFView.zoomOut();
});
document.getElementById('fullscreen').addEventListener('click',
function() {
PDFView.fullscreen();
});
document.getElementById('openFile').addEventListener('click',
function() {
document.getElementById('fileInput').click();
});
document.getElementById('print').addEventListener('click',
function() {
window.print();
});
document.getElementById('download').addEventListener('click',
function() {
PDFView.download();
});
document.getElementById('pageNumber').addEventListener('change',
function() {
PDFView.page = this.value;
});
document.getElementById('scaleSelect').addEventListener('change',
function() {
PDFView.parseScale(this.value);
});

document.getElementById('first_page').addEventListener('click',
function() {
PDFView.page = 1;
});
document.getElementById('last_page').addEventListener('click',
function() {
PDFView.page = PDFView.pdfDocument.numPages;
});
document.getElementById('page_rotate_ccw').addEventListener('click',
function() {
PDFView.rotatePages(-90);
});
document.getElementById('page_rotate_cw').addEventListener('click',
function() {
PDFView.rotatePages(90);
});
if (FirefoxCom.requestSync('getLoadingType') == 'passive') {
PDFView.setTitleUsingUrl(file);
PDFView.initPassiveLoading();
return;
}
PDFView.open(file, 0);
}, true);
function updateViewarea() {
if (!PDFView.initialized)
return;
var visible = PDFView.getVisiblePages();
var visiblePages = visible.views;
if (visiblePages.length === 0) {
return;
}
PDFView.renderHighestPriority();
var currentId = PDFView.page;
var firstPage = visible.first;
for (var i = 0, ii = visiblePages.length, stillFullyVisible = false;
i < ii; ++i) {
var page = visiblePages[i];
if (page.percent < 100)
break;

if (page.id === PDFView.page) {


stillFullyVisible = true;
break;
}

if (!stillFullyVisible) {
currentId = visiblePages[0].id;

}
if (!PDFView.isFullscreen) {
updateViewarea.inProgress = true; // used in "set page"
PDFView.page = currentId;
updateViewarea.inProgress = false;
}
var currentScale = PDFView.currentScale;
var currentScaleValue = PDFView.currentScaleValue;
var normalizedScaleValue = currentScaleValue == currentScale ?
currentScale * 100 : currentScaleValue;
var pageNumber = firstPage.id;
var pdfOpenParams = '#page=' + pageNumber;
pdfOpenParams += '&zoom=' + normalizedScaleValue;
var currentPage = PDFView.pages[pageNumber - 1];
var topLeft = currentPage.getPagePoint(PDFView.container.scrollLeft,
(PDFView.container.scrollTop - firstPage.y));
pdfOpenParams += ',' + Math.round(topLeft[0]) + ',' + Math.round(topLeft[1]);

var store = PDFView.store;


store.initializedPromise.then(function() {
store.set('exists', true);
store.set('page', pageNumber);
store.set('zoom', normalizedScaleValue);
store.set('scrollLeft', Math.round(topLeft[0]));
store.set('scrollTop', Math.round(topLeft[1]));
});
var href = PDFView.getAnchorUrl(pdfOpenParams);
document.getElementById('viewBookmark').href = href;

window.addEventListener('resize', function webViewerResize(evt) {


if (PDFView.initialized &&
(document.getElementById('pageWidthOption').selected ||
document.getElementById('pageFitOption').selected ||
document.getElementById('pageAutoOption').selected))
PDFView.parseScale(document.getElementById('scaleSelect').value);
updateViewarea();
});
window.addEventListener('hashchange', function webViewerHashchange(evt) {
PDFView.setHash(document.location.hash.substring(1));
});
window.addEventListener('change', function webViewerChange(evt) {
var files = evt.target.files;
if (!files || files.length == 0)
return;
// Read the local file into a Uint8Array.
var fileReader = new FileReader();
fileReader.onload = function webViewerChangeFileReaderOnload(evt) {
var buffer = evt.target.result;
var uint8Array = new Uint8Array(buffer);
PDFView.open(uint8Array, 0);
};
var file = files[0];

fileReader.readAsArrayBuffer(file);
PDFView.setTitleUsingUrl(file.name);
// URL does not reflect proper document location - hiding some icons.
document.getElementById('viewBookmark').setAttribute('hidden', 'true');
document.getElementById('download').setAttribute('hidden', 'true');
}, true);
function selectScaleOption(value) {
var options = document.getElementById('scaleSelect').options;
var predefinedValueFound = false;
for (var i = 0; i < options.length; i++) {
var option = options[i];
if (option.value != value) {
option.selected = false;
continue;
}
option.selected = true;
predefinedValueFound = true;
}
return predefinedValueFound;
}
window.addEventListener('localized', function localized(evt) {
document.getElementsByTagName('html')[0].dir = mozL10n.language.direction;
}, true);
window.addEventListener('scalechange', function scalechange(evt) {
var customScaleOption = document.getElementById('customScaleOption');
customScaleOption.selected = false;
if (!evt.resetAutoSettings &&
(document.getElementById('pageWidthOption').selected ||
document.getElementById('pageFitOption').selected ||
document.getElementById('pageAutoOption').selected)) {
updateViewarea();
return;
}
var predefinedValueFound = selectScaleOption('' + evt.scale);
if (!predefinedValueFound) {
customScaleOption.textContent = Math.round(evt.scale * 10000) / 100 + '%';
customScaleOption.selected = true;
}
updateViewarea();
}, true);
window.addEventListener('pagechange', function pagechange(evt) {
var page = evt.pageNumber;
if (document.getElementById('pageNumber').value != page) {
document.getElementById('pageNumber').value = page;
var selected = document.querySelector('.thumbnail.selected');
if (selected)
selected.classList.remove('selected');
var thumbnail = document.getElementById('thumbnailContainer' + page);
thumbnail.classList.add('selected');
var visibleThumbs = PDFView.getVisibleThumbs();
var numVisibleThumbs = visibleThumbs.views.length;
// If the thumbnail isn't currently visible scroll it into view.

if (numVisibleThumbs > 0) {
var first = visibleThumbs.first.id;
// Account for only one thumbnail being visible.
var last = numVisibleThumbs > 1 ?
visibleThumbs.last.id : first;
if (page <= first || page >= last)
scrollIntoView(thumbnail);
}
}
document.getElementById('previous').disabled = (page <= 1);
document.getElementById('next').disabled = (page >= PDFView.pages.length);
}, true);
// Firefox specific event, so that we can prevent browser from zooming
window.addEventListener('DOMMouseScroll', function(evt) {
if (evt.ctrlKey) {
evt.preventDefault();
var ticks = evt.detail;
var direction = (ticks > 0) ? 'zoomOut' : 'zoomIn';
for (var i = 0, length = Math.abs(ticks); i < length; i++)
PDFView[direction]();
} else if (PDFView.isFullscreen) {
var FIREFOX_DELTA_FACTOR = -40;
PDFView.mouseScroll(evt.detail * FIREFOX_DELTA_FACTOR);
}
}, false);
window.addEventListener('mousemove', function keydown(evt) {
if (PDFView.isFullscreen) {
PDFView.showPresentationControls();
}
}, false);
window.addEventListener('mousedown', function mousedown(evt) {
if (PDFView.isFullscreen && evt.button === 0) {
// Mouse click in fullmode advances a page
evt.preventDefault();
}

PDFView.page++;

}, false);
window.addEventListener('keydown', function keydown(evt) {
var handled = false;
var cmd = (evt.ctrlKey ? 1 : 0) |
(evt.altKey ? 2 : 0) |
(evt.shiftKey ? 4 : 0) |
(evt.metaKey ? 8 : 0);
// First, handle the key bindings that are independent whether an input
// control is selected or not.
if (cmd == 1 || cmd == 8) { // either CTRL or META key.
switch (evt.keyCode) {
case 70:
if (!PDFView.supportsIntegratedFind) {
PDFFindBar.toggle();
handled = true;
}

break;
case 61: // FF/Mac '='
case 107: // FF '+' and '='
case 187: // Chrome '+'
PDFView.zoomIn();
handled = true;
break;
case 173: // FF/Mac '-'
case 109: // FF '-'
case 189: // Chrome '-'
PDFView.zoomOut();
handled = true;
break;
case 48: // '0'
PDFView.parseScale(DEFAULT_SCALE, true);
handled = true;
break;

// CTRL or META with or without SHIFT.


if (cmd == 1 || cmd == 8 || cmd == 5 || cmd == 12) {
switch (evt.keyCode) {
case 71: // g
if (!PDFView.supportsIntegratedFind) {
PDFFindBar.dispatchEvent('again', cmd == 5 || cmd == 12);
handled = true;
}
break;
}
}
if (handled) {
evt.preventDefault();
return;
}
// Some shortcuts should not get handled if a control/input element
// is selected.
var curElement = document.activeElement;
if (curElement && (curElement.tagName == 'INPUT' ||
curElement.tagName == 'SELECT')) {
return;
}
var controlsElement = document.getElementById('toolbar');
while (curElement) {
if (curElement === controlsElement && !PDFView.isFullscreen)
return; // ignoring if the 'toolbar' element is focused
curElement = curElement.parentNode;
}
if (cmd == 0) { // no control key pressed at all.
switch (evt.keyCode) {
case 38: // up arrow
case 33: // pg up
case 8: // backspace
if (!PDFView.isFullscreen) {
break;
}
// in fullscreen mode falls throw here

case 37: // left arrow


case 75: // 'k'
case 80: // 'p'
PDFView.page--;
handled = true;
break;
case 40: // down arrow
case 34: // pg down
case 32: // spacebar
if (!PDFView.isFullscreen) {
break;
}
// in fullscreen mode falls throw here
case 39: // right arrow
case 74: // 'j'
case 78: // 'n'
PDFView.page++;
handled = true;
break;
case 36: // home
if (PDFView.isFullscreen) {
PDFView.page = 1;
handled = true;
}
break;
case 35: // end
if (PDFView.isFullscreen) {
PDFView.page = PDFView.pdfDocument.numPages;
handled = true;
}
break;

case 82: // 'r'


PDFView.rotatePages(90);
break;

if (cmd == 4) { // shift-key
switch (evt.keyCode) {
case 82: // 'r'
PDFView.rotatePages(-90);
break;
}
}
if (handled) {
evt.preventDefault();
PDFView.clearMouseScrollState();
}
});
window.addEventListener('beforeprint', function beforePrint(evt) {
PDFView.beforePrint();
});
window.addEventListener('afterprint', function afterPrint(evt) {
PDFView.afterPrint();
});

(function fullscreenClosure() {
function fullscreenChange(e) {
var isFullscreen = document.fullscreenElement || document.mozFullScreen ||
document.webkitIsFullScreen;

if (!isFullscreen) {
PDFView.exitFullscreen();
}

window.addEventListener('fullscreenchange', fullscreenChange, false);


window.addEventListener('mozfullscreenchange', fullscreenChange, false);
window.addEventListener('webkitfullscreenchange', fullscreenChange, false);
})();

K Lp_z P0==>p yM=3 t'p88hPh 8C0h @ 


if (self.CavalryLogger) { CavalryLogger.start_js(["p0usZ"]); }

self.__DEV__=self.__DEV__||0;

if(JSON.stringify(["\u2028\u2029"])==='["\u2028\u2029"]')JSON.stringify=function
(a){var b=/\u2028/g,c=/\u2029/g;return function(d,e,f){var g=a.call(this,d,e,f);
if(g){if(-1<g.indexOf('\u2028'))g=g.replace(b,'\\u2028');if(-1<g.indexOf('\u2029
'))g=g.replace(c,'\\u2029');}return g;};}(JSON.stringify);

(function(a){if(a.require)return;var b=Object.prototype.toString,c={},d={},e={},
f=0,g=1,h=2,i=Object.prototype.hasOwnProperty;function j(s){if(a.ErrorUtils&&!a.
ErrorUtils.inGuard())return ErrorUtils.applyWithGuard(j,this,arguments);var t=c[
s],u,v,w;if(!c[s]){w='Requiring unknown module "'+s+'"';throw new Error(w);}if(t
.hasError)throw new Error('Requiring module "'+s+'" which threw an exception');i
f(t.waiting){w='Requiring module "'+s+'" with unresolved dependencies';throw new
Error(w);}if(!t.exports){var x=t.exports={},y=t.factory;if(typeof y==='string')
{var z='('+y+')';y=eval.apply(a,[z]);}if(b.call(y)==='[object Function]'){var aa
=[],ba=t.dependencies,ca=ba.length,da;if(t.special&h)ca=Math.min(ca,y.length);tr
y{for(v=0;v<ca;v++){u=ba[v];aa.push(u==='module'?t:(u==='exports'?x:j(u)));}da=y
.apply(t.context||a,aa);}catch(ea){t.hasError=true;throw ea;}if(da)t.exports=da;
}else t.exports=y;}if(t.refcount--===1)delete c[s];return t.exports;}function k(
s,t,u,v,w,x){if(t===undefined){t=[];u=s;s=n();}else if(u===undefined){u=t;if(b.c
all(s)==='[object Array]'){t=s;s=n();}else t=[];}var y={cancel:l.bind(this,s)},z
=c[s];if(z){if(x)z.refcount+=x;return y;}else if(!t&&!u&&x){e[s]=(e[s]||0)+x;ret
urn y;}else{z={id:s};z.refcount=(e[s]||0)+(x||0);delete e[s];}z.factory=u;z.depe
ndencies=t;z.context=w;z.special=v;z.waitingMap={};z.waiting=0;z.hasError=false;
c[s]=z;p(s);return y;}function l(s){if(!c[s])return;var t=c[s];delete c[s];for(v
ar u in t.waitingMap)if(t.waitingMap[u])delete d[u][s];for(var v=0;v<t.dependenc
ies.length;v++){u=t.dependencies[v];if(c[u]){if(c[u].refcount--===1)l(u);}else i
f(e[u])e[u]--;}}function m(s,t,u){return k(s,t,undefined,g,u,1);}function n(){re

turn '__mod__'+f++;}function o(s,t){if(!s.waitingMap[t]&&s.id!==t){s.waiting++;s


.waitingMap[t]=1;d[t]||(d[t]={});d[t][s.id]=1;}}function p(s){var t=[],u=c[s],v,
w,x;for(w=0;w<u.dependencies.length;w++){v=u.dependencies[w];if(!c[v]){o(u,v);}e
lse if(c[v].waiting)for(x in c[v].waitingMap)if(c[v].waitingMap[x])o(u,x);}if(u.
waiting===0&&u.special&g)t.push(s);if(d[s]){var y=d[s],z;d[s]=undefined;for(v in
y){z=c[v];for(x in u.waitingMap)if(u.waitingMap[x])o(z,x);if(z.waitingMap[s]){z
.waitingMap[s]=undefined;z.waiting--;}if(z.waiting===0&&z.special&g)t.push(v);}}
for(w=0;w<t.length;w++)j(t[w]);}function q(s,t){c[s]={id:s};c[s].exports=t;}q('m
odule',0);q('exports',0);q('define',k);q('global',a);q('require',j);q('requireDy
namic',j);q('requireLazy',m);k.amd={};a.define=k;a.require=j;a.requireDynamic=j;
a.requireLazy=m;j.__debug={modules:c,deps:d};var r=function(s,t,u,v){k(s,t,u,v||
h);};a.__d=function(s,t,u,v){t=['global','require','requireDynamic','requireLazy
','module','exports'].concat(t);r(s,t,u,v);};})(this);
__d("lowerDomain",[],function(a,b,c,d,e,f){if(document.domain.toLowerCase().matc
h(/(^|\.)facebook\..*/))document.domain=window.location.hostname.replace(/^.*(fa
cebook\..*)$/i,'$1');});
__d("markJSEnabled",[],function(a,b,c,d,e,f){var g=document.documentElement;g.cl
assName=g.className.replace('no_js','');});
__d("copyProperties",[],function(a,b,c,d,e,f){function g(h,i,j,k,l,m,n){h=h||{};
var o=[i,j,k,l,m],p=0,q;while(o[p]){q=o[p++];for(var r in q)h[r]=q[r];if(q.hasOw
nProperty&&q.hasOwnProperty('toString')&&(typeof q.toString!='undefined')&&(h.to
String!==q.toString))h.toString=q.toString;}return h;}e.exports=g;});
__d("Env",["copyProperties"],function(a,b,c,d,e,f){var g=b('copyProperties'),h={
start:Date.now()};if(a.Env){g(h,a.Env);a.Env=undefined;}e.exports=h;});
__d("ErrorUtils",["Env"],function(a,b,c,d,e,f){var g=b('Env'),h=[],i=[],j=50,k=w
indow.chrome&&'type' in new Error(),l=/^(\s+at\s)?((\w+)?.*)(\(|@)?.*(https?:[^:
]*)(:(\d+))?(:(\d+))?/mg;function m(y){if(!y)return;y=y.split(/\n\n/)[0];l.lastI
ndex=0;var z=[],aa;while(aa=l.exec(y))z.push('
at '+(aa[3]||'')+(aa[3]?'(':''
)+aa[5]+':'+aa[7]+(aa[9]?':'+aa[9]:'')+(aa[3]?')':''));return z.length?z.join('\
n'):y;}function n(y){if(!y){return {};}else if(y._originalError)return y;var z={
line:y.lineNumber||y.line,message:y.message,name:y.name,script:y.fileName||y.sou
rceURL||y.script,stack:m(y.stackTrace||y.stack)};z._originalError=y;if(y.framesT
oPop){var aa=z.stack.split('\n');aa.splice(0,y.framesToPop);z.stack=aa.join('\n'
);if(/(\w{3,5}:\/\/[^:]+):(\d+)/.test(aa[0])){z.script=RegExp.$1;z.line=parseInt
(RegExp.$2,10);}}if(k&&/(\w{3,5}:\/\/[^:]+):(\d+)/.test(y.stack)){z.script=RegEx
p.$1;z.line=parseInt(RegExp.$2,10);}for(var ba in z)(z[ba]==null&&delete z[ba]);
return z;}function o(){try{throw new Error();}catch(y){var z=n(y).stack;return z
&&z.replace(/[\s\S]*__getTrace__.*\n/,'');}}function p(y,z){y=n(y);!z;if(i.lengt
h>j)i.splice(j/2,1);i.push(y);for(var aa=0;aa<h.length;aa++)try{h[aa](y);}catch(
ba){}}var q=false;function r(){return q;}function s(){q=false;}function t(y,z,aa
,ba){var ca=!q;if(ca)q=true;try{var ea=y.apply(z,aa||[]);if(ca)s();return ea;}ca
tch(da){if(ca)s();var fa=n(da);if(ba)ba(fa);if(y)fa.callee=y.toString().substrin
g(0,100);if(aa)fa.args=String(aa).substring(0,100);var ga=g.nocatch||(/nocatch/)
.test(location.search);p(fa,ga);if(ga)throw da;}}function u(y){function z(){retu
rn t(y,this,arguments);}return z;}function v(y,z,aa){p({message:y,script:z,line:
aa},true);}window.onerror=v;function w(y,z){h.push(y);if(!z)i.forEach(y);}var x=
{addListener:w,applyWithGuard:t,getTrace:o,guard:u,history:i,inGuard:r,normalize
Error:n,onerror:v,reportError:p};e.exports=a.ErrorUtils=x;if(typeof __t!=='undef
ined')__t.setHandler(p);});
__d("CallbackDependencyManager",["ErrorUtils"],function(a,b,c,d,e,f){var g=b('Er
rorUtils');function h(){this._0={};this._1={};this._2=1;this._3={};}h.prototype.
_4=function(i,j){var k=0,l={};for(var m=0,n=j.length;m<n;m++)l[j[m]]=1;for(var o
in l){if(this._3[o])continue;k++;if(this._0[o]===undefined)this._0[o]={};this._
0[o][i]=(this._0[o][i]||0)+1;}return k;};h.prototype._5=function(i){if(!this._0[
i])return;for(var j in this._0[i]){this._0[i][j]--;if(this._0[i][j]<=0)delete th
is._0[i][j];this._1[j]._6--;if(this._1[j]._6<=0){var k=this._1[j]._7;delete this
._1[j];g.applyWithGuard(k);}}};h.prototype.addDependenciesToExistingCallback=fun
ction(i,j){if(!this._1[i])return null;var k=this._4(i,j);this._1[i]._6+=k;return
i;};h.prototype.isPersistentDependencySatisfied=function(i){return !!this._3[i]
;};h.prototype.satisfyPersistentDependency=function(i){this._3[i]=1;this._5(i);}

;h.prototype.satisfyNonPersistentDependency=function(i){var j=this._3[i]===1;if(
!j)this._3[i]=1;this._5(i);if(!j)delete this._3[i];};h.prototype.registerCallbac
k=function(i,j){var k=this._2;this._2++;var l=this._4(k,j);if(l===0){g.applyWith
Guard(i);return null;}this._1[k]={_7:i,_6:l};return k;};h.prototype.unsatisfyPer
sistentDependency=function(i){delete this._3[i];};e.exports=h;});
__d("hasArrayNature",[],function(a,b,c,d,e,f){function g(h){return (!!h&&(typeof
h=='object'||typeof h=='function')&&('length' in h)&&!('setInterval' in h)&&(Ob
ject.prototype.toString.call(h)==="[object Array]"||('callee' in h)||('item' in
h)));}e.exports=g;});
__d("createArrayFrom",["hasArrayNature"],function(a,b,c,d,e,f){var g=b('hasArray
Nature');function h(i){if(!g(i))return [i];if(i.item){var j=i.length,k=new Array
(j);while(j--)k[j]=i[j];return k;}return Array.prototype.slice.call(i);}e.export
s=h;});
__d("Arbiter",["ErrorUtils","CallbackDependencyManager","copyProperties","create
ArrayFrom","hasArrayNature"],function(a,b,c,d,e,f){var g=b('ErrorUtils'),h=b('Ca
llbackDependencyManager'),i=b('copyProperties'),j=b('createArrayFrom'),k=b('hasA
rrayNature');if(!window.async_callback)window.async_callback=function(n,o){retur
n n;};function l(){i(this,{_listeners:[],_events:{},_last_id:1,_listen:{},_index
:{},_callbackManager:new h()});i(this,l);}i(l,{SUBSCRIBE_NEW:'new',SUBSCRIBE_ALL
:'all',BEHAVIOR_EVENT:'event',BEHAVIOR_PERSISTENT:'persistent',BEHAVIOR_STATE:'s
tate',subscribe:function(n,o,p){n=j(n);var q=n.some(function(y){return !y||typeo
f(y)!='string';});if(q)return null;p=p||l.SUBSCRIBE_ALL;var r=l._getInstance(thi
s);r._listeners.push({callback:o,types:n});var s=r._listeners.length-1;for(var t
=0;t<n.length;t++){var u=n[t];if(!r._index[u])r._index[u]=[];r._index[u].push(s)
;if(p==l.SUBSCRIBE_ALL)if(u in r._events)for(var v=0;v<r._events[u].length;v++){
var w=r._events[u][v],x=g.applyWithGuard(o,null,[u,w]);if(x===false){r._events[u
].splice(v,1);v--;}}}return new m(r,s);},unsubscribe:function(n){n.unsubscribe()
;},inform:g.guard(function(n,o,p){var q=k(n);n=j(n);var r=l._getInstance(this),s
={};p=p||l.BEHAVIOR_EVENT;for(var t=0;t<n.length;t++){var u=n[t],v=null;if(!(u i
n r._events))r._events[u]=[];var w;if(p==l.BEHAVIOR_PERSISTENT){v=r._events.leng
th;r._events[u].push(o);r._events[u]._stateful=false;w=true;}else if(p==l.BEHAVI
OR_STATE){v=0;r._events[u].length=0;r._events[u].push(o);r._events[u]._stateful=
true;w=true;}else if(p==l.BEHAVIOR_EVENT){r._events[u].length=0;r._events[u]._st
ateful=false;w=false;}a.ArbiterMonitor&&a.ArbiterMonitor.record('event',u,o,r);v
ar x;if(r._index[u]){var y=j(r._index[u]);for(var z=0;z<y.length;z++){var aa=r._
listeners[y[z]];if(aa){x=g.applyWithGuard(aa.callback,null,[u,o]);if(x===false){
if(v!==null)r._events[u].splice(v,1);break;}}}}r._updateCallbacks(u,o,w);a.Arbit
erMonitor&&a.ArbiterMonitor.record('done',u,o,r);s[u]=x;}return q?s:s[n[0]];}),q
uery:function(n){var o=l._getInstance(this);if(!(n in o._events))return null;if(
o._events[n].length)return o._events[n][0];return null;},_instance:null,_getInst
ance:function(n){if(n instanceof l)return n;if(!l._instance)l._instance=new l();
return l._instance;},registerCallback:function(n,o){if(!n)return null;var p=l._g
etInstance(this)._callbackManager;if(typeof n==='function'){return p.registerCal
lback(a.async_callback(n,'arbiter'),o);}else return p.addDependenciesToExistingC
allback(n,o);},_updateCallbacks:function(n,o,p){if(o===null)return;var q=l._getI
nstance(this)._callbackManager;if(p){q.satisfyPersistentDependency(n);}else q.sa
tisfyNonPersistentDependency(n);}});function m(n,o){this._instance=n;this._id=o;
}i(m.prototype,{unsubscribe:function(){var n=this._instance._listeners,o=n[this.
_id];if(!o)return;for(var p=0;p<o.types.length;p++){var q=o.types[p],r=this._ins
tance._index[q];if(r)for(var s=0;s<r.length;s++)if(r[s]==this._id){r.splice(s,1)
;if(r.length===0)delete r[q];break;}}delete n[this._id];}});e.exports=l;});
__d("ArbiterFrame",[],function(a,b,c,d,e,f){var g={inform:function(h,i,j){var k=
parent.frames,l=k.length,m;i.crossFrame=true;for(var n=0;n<l;n++){m=k[n];try{if(
!m||m==window)continue;if(m.require){m.require('Arbiter').inform(h,i,j);}else if
(m.AsyncLoader)m.AsyncLoader.wakeUp(h,i,j);}catch(o){}}}};e.exports=g;});
__d("Plugin",["Arbiter","ArbiterFrame"],function(a,b,c,d,e,f){var g=b('Arbiter')
,h=b('ArbiterFrame'),i={CONNECT:'platform/plugins/connect',DISCONNECT:'platform/
plugins/disconnect',ERROR:'platform/plugins/error',connect:function(j,k){var l={
identifier:j,href:j,story_fbid:k};g.inform(i.CONNECT,l);h.inform(i.CONNECT,l);},
disconnect:function(j,k){var l={identifier:j,href:j,story_fbid:k};g.inform(i.DIS

CONNECT,l);h.inform(i.DISCONNECT,l);},error:function(j,k){g.inform(i.ERROR,{acti
on:j,content:k});}};e.exports=i;});
__d("removeArrayReduce",[],function(a,b,c,d,e,f){Array.prototype.reduce=undefine
d;Array.prototype.reduceRight=undefined;});
__d("invariant",[],function(a,b,c,d,e,f){function g(h){if(!h)throw new Error('In
variant Violation');}e.exports=g;});
__d("repeatString",["invariant"],function(a,b,c,d,e,f){var g=b('invariant');func
tion h(i,j){if(j===1)return i;g(j>=0);var k='';while(j){if(j&1)k+=i;if((j>>=1))i
+=i;}return k;}e.exports=h;});
__d("BitMap",["copyProperties","repeatString"],function(a,b,c,d,e,f){var g=b('co
pyProperties'),h=b('repeatString'),i='0123456789abcdefghijklmnopqrstuvwxyzABCDEF
GHIJKLMNOPQRSTUVWXYZ-_';function j(){this._bits=[];}g(j.prototype,{set:function(
m){this._bits[m]=1;return this;},toString:function(){var m=[];for(var n=0;n<this
._bits.length;n++)m.push(this._bits[n]?1:0);return m.length?l(m.join('')):'';},t
oCompressedString:function(){if(this._bits.length===0)return '';var m=[],n=1,o=t
his._bits[0]||0,p=o.toString(2);for(var q=1;q<this._bits.length;q++){var r=this.
_bits[q]||0;if(r===o){n++;}else{m.push(k(n));o=r;n=1;}}if(n)m.push(k(n));return
l(p+m.join(''));}});function k(m){var n=m.toString(2),o=h('0',n.length-1);return
o+n;}function l(m){var n=(m+'00000').match(/[01]{6}/g),o='';for(var p=0;p<n.len
gth;p++)o+=i[parseInt(n[p],2)];return o;}e.exports=j;});
__d("ge",[],function(a,b,c,d,e,f){function g(j,k,l){return typeof j!='string'?j:
!k?document.getElementById(j):h(j,k,l);}function h(j,k,l){var m,n,o;if(i(k)==j){
return k;}else if(k.getElementsByTagName){n=k.getElementsByTagName(l||'*');for(o
=0;o<n.length;o++)if(i(n[o])==j)return n[o];}else{n=k.childNodes;for(o=0;o<n.len
gth;o++){m=h(j,n[o]);if(m)return m;}}return null;}function i(j){var k=j.getAttri
buteNode&&j.getAttributeNode('id');return k?k.value:null;}e.exports=g;});
__d("ServerJS",["BitMap","ErrorUtils","copyProperties","ge"],function(a,b,c,d,e,
f){var g=b('BitMap'),h=b('ErrorUtils'),i=b('copyProperties'),j=b('ge'),k=0,l=new
g();function m(){this._moduleMap={};this._relativeTo=null;this._moduleIDsToClea
nup={};}m.getLoadedModuleHash=function(){return l.toCompressedString();};i(m.pro
totype,{handle:function(q){if(q.__guard)throw new Error('ServerJS.handle called
on data that has already been handled');q.__guard=true;n(q.define||[],this._hand
leDefine,this);n(q.markup||[],this._handleMarkup,this);n(q.elements||[],this._ha
ndleElement,this);n(q.instances||[],this._handleInstance,this);var r=n(q.require
||[],this._handleRequire,this);return {cancel:function(){for(var s=0;s<r.length;
s++)if(r[s])r[s].cancel();}};},handlePartial:function(q){(q.instances||[]).forEa
ch(o.bind(null,this._moduleMap,3));(q.markup||[]).forEach(o.bind(null,this._modu
leMap,2));return this.handle(q);},setRelativeTo:function(q){this._relativeTo=q;r
eturn this;},cleanup:function(){var q=[];for(var r in this._moduleMap)q.push(r);
d.call(null,q,p);this._moduleMap={};function s(u){var v=this._moduleIDsToCleanup
[u],w=v[0],x=v[1];delete this._moduleIDsToCleanup[u];var y=x?'JS::call("'+w+'",
"'+x+'", ...)':'JS::requireModule("'+w+'")',z=y+' did not fire because it has mi
ssing dependencies.';throw new Error(z);}for(var t in this._moduleIDsToCleanup)h
.applyWithGuard(s,this,[t]);},_handleDefine:function(q,r,s,t){if(t>=0)l.set(t);d
efine(q,r,function(){this._replaceTransportMarkers(s);return s;}.bind(this));},_
handleRequire:function(q,r,s,t){var u=[q].concat(s||[]),v=(r?'__call__':'__requi
reModule__')+k++;this._moduleIDsToCleanup[v]=[q,r];return define(v,u,function(w)
{delete this._moduleIDsToCleanup[v];t&&this._replaceTransportMarkers(t);if(r){if
(!w[r])throw new TypeError('Module '+q+' has no method '+r);w[r].apply(w,t||[]);
}},1,this,1);},_handleInstance:function(q,r,s,t){var u=null;if(r)u=function(v){t
his._replaceTransportMarkers(s);var w=Object.create(v.prototype);v.apply(w,s);re
turn w;}.bind(this);define(q,r,u,0,null,t);},_handleMarkup:function(q,r,s){defin
e(q,['HTML'],function(t){return t.replaceJSONWrapper(r).getRootNode();},0,null,s
);},_handleElement:function(q,r,s,t){var u=[],v=0;if(t){u.push(t);v=1;s++;}defin
e(q,u,function(w){var x=j(r,w);if(!x){var y='Could not find element '+r;throw ne
w Error(y);}return x;},v,null,s);},_replaceTransportMarkers:function(q,r){var s=
(typeof r!=='undefined')?q[r]:q,t;if(Array.isArray(s)){for(t=0;t<s.length;t++)th
is._replaceTransportMarkers(s,t);}else if(s&&typeof s=='object')if(s.__m){q[r]=b
.call(null,s.__m);}else if(s.__e){q[r]=j(s.__e);}else if(s.__rel){q[r]=this._rel
ativeTo;}else for(var u in s)this._replaceTransportMarkers(s,u);}});function n(q

,r,s){return q.map(function(t){return h.applyWithGuard(r,s,t);});}function o(q,r


,s){var t=s[0];if(!(t in q))s[r]=(s[r]||0)+1;q[t]=true;}function p(){return {};}
e.exports=m;});
__d("wrapFunction",[],function(a,b,c,d,e,f){var g={};function h(i,j,k){j=j||'def
ault';return function(){var l=j in g?g[j](i,k):i;return l.apply(this,arguments);
};}h.setWrapper=function(i,j){j=j||'default';g[j]=i;};e.exports=h;});
__d("DOMEventListener",["wrapFunction"],function(a,b,c,d,e,f){var g=b('wrapFunct
ion'),h,i;if(window.addEventListener){h=function(k,l,m){m.wrapper=g(m,'entry',k+
':'+l);k.addEventListener(l,m.wrapper,false);};i=function(k,l,m){k.removeEventLi
stener(l,m.wrapper,false);};}else if(window.attachEvent){h=function(k,l,m){m.wra
pper=g(m,'entry',k+':'+l);k.attachEvent('on'+l,m.wrapper);};i=function(k,l,m){k.
detachEvent('on'+l,m.wrapper);};}var j={add:function(k,l,m){h(k,l,m);return {rem
ove:function(){i(k,l,m);k=null;}};},remove:i};e.exports=j;});
__d("$",["ge"],function(a,b,c,d,e,f){var g=b('ge');function h(i){var j=g(i);if(!
j){if(typeof i=='undefined'){i='undefined';}else if(i===null)i='null';throw new
Error('Tried to get element "'+i.toString()+'" but it is not present '+'on the p
age.');}return j;}e.exports=h;});
__d("CSS",["$"],function(a,b,c,d,e,f){var g=b('$'),h='hidden_elem',i={setClass:f
unction(j,k){g(j).className=k||'';return j;},hasClass:function(j,k){j=g(j);if(j.
classList)return !!k&&j.classList.contains(k);return (' '+j.className+' ').index
Of(' '+k+' ')>-1;},addClass:function(j,k){j=g(j);if(k)if(j.classList){j.classLis
t.add(k);}else if(!i.hasClass(j,k))j.className=j.className+' '+k;return j;},remo
veClass:function(j,k){j=g(j);if(k)if(j.classList){j.classList.remove(k);}else if
(i.hasClass(j,k))j.className=j.className.replace(new RegExp('(^|\\s)'+k+'(?:\\s|
$)','g'),'$1').replace(/\s+/g,' ').replace(/^\s*|\s*$/g,'');return j;},condition
Class:function(j,k,l){return (l?i.addClass:i.removeClass)(j,k);},toggleClass:fun
ction(j,k){return i.conditionClass(j,k,!i.hasClass(j,k));},shown:function(j){ret
urn !i.hasClass(j,h);},hide:function(j){return i.addClass(j,h);},show:function(j
){return i.removeClass(j,h);},toggle:function(j){return i.toggleClass(j,h);},con
ditionShow:function(j,k){return i.conditionClass(j,h,!k);}};e.exports=i;});
__d("UserAgent",[],function(a,b,c,d,e,f){var g=false,h,i,j,k,l,m,n,o,p,q,r,s,t,u
;function v(){if(g)return;g=true;var x=navigator.userAgent,y=/(?:MSIE.(\d+\.\d+)
)|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+
\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))/.exec(x),z=/(Mac OS X)|(Windows)|(Linux)
/.exec(x);r=/\b(iPhone|iP[ao]d)/.exec(x);s=/\b(iP[ao]d)/.exec(x);p=/Android/i.ex
ec(x);t=/FBAN\/\w+;/i.exec(x);u=/Mobile/i.exec(x);q=!!(/Win64/.exec(x));if(y){h=
y[1]?parseFloat(y[1]):NaN;if(h&&document.documentMode)h=document.documentMode;i=
y[2]?parseFloat(y[2]):NaN;j=y[3]?parseFloat(y[3]):NaN;k=y[4]?parseFloat(y[4]):Na
N;if(k){y=/(?:Chrome\/(\d+\.\d+))/.exec(x);l=y&&y[1]?parseFloat(y[1]):NaN;}else
l=NaN;}else h=i=j=l=k=NaN;if(z){if(z[1]){var aa=/(?:Mac OS X (\d+(?:[._]\d+)?))/
.exec(x);m=aa?parseFloat(aa[1].replace('_','.')):true;}else m=false;n=!!z[2];o=!
!z[3];}else m=n=o=false;}var w={ie:function(){return v()||h;},ie64:function(){re
turn w.ie()&&q;},firefox:function(){return v()||i;},opera:function(){return v()|
|j;},webkit:function(){return v()||k;},safari:function(){return w.webkit();},chr
ome:function(){return v()||l;},windows:function(){return v()||n;},osx:function()
{return v()||m;},linux:function(){return v()||o;},iphone:function(){return v()||
r;},mobile:function(){return v()||(r||s||p||u);},nativeApp:function(){return v()
||t;},android:function(){return v()||p;},ipad:function(){return v()||s;}};e.expo
rts=w;});
__d("createObjectFrom",["hasArrayNature"],function(a,b,c,d,e,f){var g=b('hasArra
yNature');function h(i,j){var k={},l=g(j);if(typeof j=='undefined')j=true;for(va
r m=i.length;m--;)k[i[m]]=l?j[m]:j;return k;}e.exports=h;});
__d("DOMQuery",["CSS","UserAgent","createArrayFrom","createObjectFrom","ge"],fun
ction(a,b,c,d,e,f){var g=b('CSS'),h=b('UserAgent'),i=b('createArrayFrom'),j=b('c
reateObjectFrom'),k=b('ge'),l=null;function m(o,p){return o.hasAttribute?o.hasAt
tribute(p):o.getAttribute(p)!==null;}var n={find:function(o,p){var q=n.scry(o,p)
;return q[0];},scry:function(o,p){if(!o||!o.getElementsByTagName)return [];var q
=p.split(' '),r=[o];for(var s=0;s<q.length;s++){if(r.length===0)break;if(q[s]===
'')continue;var t=q[s],u=q[s],v=[],w=false;if(t.charAt(0)=='^')if(s===0){w=true;

t=t.slice(1);}else return [];t=t.replace(/\[(?:[^=\]]*=(?:"[^"]*"|'[^']*'))?|[.#


]/g,' $&');var x=t.split(' '),y=x[0]||'*',z=y=='*',aa=x[1]&&x[1].charAt(0)=='#';
if(aa){var ba=k(x[1].slice(1),o,y);if(ba&&(z||ba.tagName.toLowerCase()==y))for(v
ar ca=0;ca<r.length;ca++)if(w&&n.contains(ba,r[ca])){v=[ba];break;}else if(docum
ent==r[ca]||n.contains(r[ca],ba)){v=[ba];break;}}else{var da=[],ea=r.length,fa,g
a=!w&&u.indexOf('[')<0&&document.querySelectorAll;for(var ha=0;ha<ea;ha++){if(w)
{fa=[];var ia=r[ha].parentNode;while(n.isElementNode(ia)){if(z||ia.tagName.toLow
erCase()==y)fa.push(ia);ia=ia.parentNode;}}else if(ga){fa=r[ha].querySelectorAll
(u);}else fa=r[ha].getElementsByTagName(y);var ja=fa.length;for(var ka=0;ka<ja;k
a++)da.push(fa[ka]);}if(!ga)for(var la=1;la<x.length;la++){var ma=x[la],na=ma.ch
arAt(0)=='.',oa=ma.substring(1);for(ha=0;ha<da.length;ha++){var pa=da[ha];if(!pa
)continue;if(na){if(!g.hasClass(pa,oa))delete da[ha];continue;}else{var qa=ma.sl
ice(1,ma.length-1);if(qa.indexOf('=')==-1){if(!m(pa,qa)){delete da[ha];continue;
}}else{var ra=qa.split('='),sa=ra[0],ta=ra[1];ta=ta.slice(1,ta.length-1);if(pa.g
etAttribute(sa)!=ta){delete da[ha];continue;}}}}}for(ha=0;ha<da.length;ha++)if(d
a[ha]){v.push(da[ha]);if(w)break;}}r=v;}return r;},getText:function(o){if(n.isTe
xtNode(o)){return o.data;}else if(n.isElementNode(o)){if(l===null){var p=documen
t.createElement('div');l=p.textContent!=null?'textContent':'innerText';}return o
[l];}else return '';},getSelection:function(){var o=window.getSelection,p=docume
nt.selection;if(o){return o()+'';}else if(p)return p.createRange().text;return n
ull;},contains:function(o,p){o=k(o);p=k(p);if(!o||!p){return false;}else if(o===
p){return true;}else if(n.isTextNode(o)){return false;}else if(n.isTextNode(p)){
return n.contains(o,p.parentNode);}else if(o.contains){return o.contains(p);}els
e if(o.compareDocumentPosition){return !!(o.compareDocumentPosition(p)&16);}else
return false;},getRootElement:function(){var o=null;if(window.Quickling&&Quickl
ing.isActive())o=k('content');return o||document.body;},isNode:function(o){retur
n !!(o&&(typeof Node=='object'?o instanceof Node:typeof o=="object"&&typeof o.no
deType=='number'&&typeof o.nodeName=='string'));},isNodeOfType:function(o,p){var
q=i(p).join('|').toUpperCase().split('|'),r=j(q);return n.isNode(o)&&o.nodeName
in r;},isElementNode:function(o){return n.isNode(o)&&o.nodeType==1;},isTextNode
:function(o){return n.isNode(o)&&o.nodeType==3;},getDocumentScrollElement:functi
on(o){o=o||document;var p=h.chrome()||h.webkit();return !p&&o.compatMode==='CSS1
Compat'?o.documentElement:o.body;}};e.exports=n;});
__d("PluginLoginButton",["DOMEventListener","DOMQuery"],function(a,b,c,d,e,f){va
r g=b('DOMEventListener'),h=b('DOMQuery'),i={redirect:function(j){window.parent.
location.replace(j);},submit:function(j){j.submit();},registration:function(j,k)
{g.add(j,'click',i.redirect.bind(null,k));},connect:function(j){g.add(j,'click',
i.submit.bind(null,h.find(j,'^form')));},logout:function(j){g.add(j,'click',i.su
bmit.bind(null,h.find(j,'^form')));}};e.exports=i;});
__d("DOMEvent",["copyProperties"],function(a,b,c,d,e,f){var g=b('copyProperties'
);function h(i){this.event=i||window.event;this.target=this.event.target||this.e
vent.srcElement;}g(h.prototype,{preventDefault:function(){var i=this.event;if(i.
preventDefault){i.preventDefault();if(!('defaultPrevented' in i))i.defaultPreven
ted=true;}else i.returnValue=false;return this;},isDefaultPrevented:function(){v
ar i=this.event;return ('defaultPrevented' in i)?i.defaultPrevented:i.returnValu
e===false;},stopPropagation:function(){var i=this.event;i.stopPropagation?i.stop
Propagation():i.cancelBubble=true;return this;},kill:function(){this.stopPropaga
tion().preventDefault();return this;}});e.exports=h;});
__d("PluginMessage",["DOMEventListener"],function(a,b,c,d,e,f){var g=b('DOMEvent
Listener'),h={listen:function(){g.add(window,'message',function(event){if((/\.fa
cebook\.com$/).test(event.origin)&&/^FB_POPUP:/.test(event.data)){var i=JSON.par
se(event.data.substring(9));if('reload' in i&&/^https?:/.test(i.reload))document
.location.replace(i.reload);}});}};e.exports=h;});
__d("Style",["DOMQuery","UserAgent","$","copyProperties"],function(a,b,c,d,e,f){
var g=b('DOMQuery'),h=b('UserAgent'),i=b('$'),j=b('copyProperties');function k(r
){return r.replace(/([A-Z])/g,'-$1').toLowerCase();}function l(r){return r.repla
ce(/-(.)/g,function(s,t){return t.toUpperCase();});}function m(r,s){var t=q.get(
r,s);return (t==='auto'||t==='scroll');}function n(r){var s={},t=r.split(/\s*;\s
*/);for(var u=0,v=t.length;u<v;u++){if(!t[u])continue;var w=t[u].split(/\s*:\s*/
);s[w[0]]=w[1];}return s;}function o(r){var s='';for(var t in r)if(r[t])s+=t+':'

+r[t]+';';return s;}function p(r){return r!==''?'alpha(opacity='+r*100+')':'';}v


ar q={set:function(r,s,t){switch(s){case 'opacity':if(s==='opacity')if(h.ie()<9)
{r.style.filter=p(t);}else r.style.opacity=t;break;case 'float':r.style.cssFloat
=r.style.styleFloat=t||'';break;default:try{r.style[l(s)]=t;}catch(u){throw new
Error('Style.set: "'+s+'" argument is invalid: "'+t+'"');}}},apply:function(r,s)
{var t;if('opacity' in s&&h.ie()<9){var u=s.opacity;s.filter=p(u);delete s.opaci
ty;}var v=n(r.style.cssText);for(t in s){var w=s[t];delete s[t];t=k(t);for(var x
in v)if(x===t||x.indexOf(t+'-')===0)delete v[x];s[t]=w;}s=j(v,s);r.style.cssTex
t=o(s);if(h.ie()<9)for(t in s)if(!s[t])q.set(r,t,'');},get:function(r,s){r=i(r);
var t;if(window.getComputedStyle){t=window.getComputedStyle(r,null);if(t)return
t.getPropertyValue(k(s));}if(document.defaultView&&document.defaultView.getCompu
tedStyle){t=document.defaultView.getComputedStyle(r,null);if(t)return t.getPrope
rtyValue(k(s));if(s=="display")return "none";}s=l(s);if(r.currentStyle){if(s==='
float')return r.currentStyle.cssFloat||r.currentStyle.styleFloat;return r.curren
tStyle[s];}return r.style&&r.style[s];},getFloat:function(r,s){return parseFloat
(q.get(r,s),10);},getOpacity:function(r){r=i(r);var s=q.get(r,'filter'),t=null;i
f(s&&(t=/(\d+(?:\.\d+)?)/.exec(s))){return parseFloat(t.pop())/100;}else if(s=q.
get(r,'opacity')){return parseFloat(s);}else return 1;},isFixed:function(r){whil
e(g.contains(document.body,r)){if(q.get(r,'position')==='fixed')return true;r=r.
parentNode;}return false;},getScrollParent:function(r){if(!r)return null;while(r
!==document.body){if(m(r,'overflow')||m(r,'overflowY')||m(r,'overflowX'))return
r;r=r.parentNode;}return window;}};e.exports=q;});
__d("DOMDimensions",["DOMQuery","Style"],function(a,b,c,d,e,f){var g=b('DOMQuery
'),h=b('Style'),i={getElementDimensions:function(j){return {width:j.offsetWidth|
|0,height:j.offsetHeight||0};},getViewportDimensions:function(){var j=(window&&w
indow.innerWidth)||(document&&document.documentElement&&document.documentElement
.clientWidth)||(document&&document.body&&document.body.clientWidth)||0,k=(window
&&window.innerHeight)||(document&&document.documentElement&&document.documentEle
ment.clientHeight)||(document&&document.body&&document.body.clientHeight)||0;ret
urn {width:j,height:k};},getViewportWithoutScrollbarDimensions:function(){var j=
(document&&document.documentElement&&document.documentElement.clientWidth)||(doc
ument&&document.body&&document.body.clientWidth)||0,k=(document&&document.docume
ntElement&&document.documentElement.clientHeight)||(document&&document.body&&doc
ument.body.clientHeight)||0;return {width:j,height:k};},getDocumentDimensions:fu
nction(j){j=j||document;var k=g.getDocumentScrollElement(j),l=k.scrollWidth||0,m
=k.scrollHeight||0;return {width:l,height:m};},measureElementBox:function(j,k,l,
m,n){var o;switch(k){case 'left':case 'right':case 'top':case 'bottom':o=[k];bre
ak;case 'width':o=['left','right'];break;case 'height':o=['top','bottom'];break;
default:throw Error('Invalid plane: '+k);}var p=function(q,r){var s=0;for(var t=
0;t<o.length;t++)s+=parseInt(h.get(j,q+'-'+o[t]+r),10)||0;return s;};return (l?p
('padding',''):0)+(m?p('border','-width'):0)+(n?p('margin',''):0);}};e.exports=i
;});
__d("PopupWindow",["DOMDimensions","DOMQuery","copyProperties"],function(a,b,c,d
,e,f){var g=b('DOMDimensions'),h=b('DOMQuery'),i=b('copyProperties'),j={_opts:{a
llowShrink:true,strategy:'vector',timeout:100,widthElement:null},init:function(k
){i(j._opts,k);setInterval(j._resizeCheck,j._opts.timeout);},_resizeCheck:functi
on(){var k=g.getViewportDimensions(),l=j._getDocumentSize(),m=l.height-k.height,
n=l.width-k.width;if(n<0&&!j._opts.widthElement)n=0;n=n>1?n:0;if(!j._opts.allowS
hrink&&m<0)m=0;if(m||n)try{window.console&&window.console.firebug;window.resizeB
y(n,m);if(n)window.moveBy(n/-2,0);}catch(o){}},_getDocumentSize:function(){var k
=g.getDocumentDimensions();if(j._opts.strategy==='offsetHeight')k.height=documen
t.body.offsetHeight;if(j._opts.widthElement){var l=h.scry(document.body,j._opts.
widthElement)[0];if(l)k.width=g.getElementDimensions(l).width;}var m=a.Dialog;if
(m&&m.max_bottom&&m.max_bottom>k.height)k.height=m.max_bottom;return k;},open:fu
nction(k,l,m){var n=typeof window.screenX!='undefined'?window.screenX:window.scr
eenLeft,o=typeof window.screenY!='undefined'?window.screenY:window.screenTop,p=t
ypeof window.outerWidth!='undefined'?window.outerWidth:document.body.clientWidth
,q=typeof window.outerHeight!='undefined'?window.outerHeight:(document.body.clie
ntHeight-22),r=parseInt(n+((p-m)/2),10),s=parseInt(o+((q-l)/2.5),10),t=('width='
+m+',height='+l+',left='+r+',top='+s);return window.open(k,'_blank',t);}};e.expo

rts=j;});
__d("PHPQuerySerializer",[],function(a,b,c,d,e,f){function g(n){return h(n,null)
;}function h(n,o){o=o||'';var p=[];if(n===null||n===undefined){p.push(i(o));}els
e if(n instanceof Array){for(var q=0;q<n.length;++q)if(n[q]!==undefined)p.push(h
(n[q],o?(o+'['+q+']'):q));}else if(typeof(n)=='object'){for(var r in n)if(n[r]!=
=undefined)p.push(h(n[r],o?(o+'['+r+']'):r));}else p.push(i(o)+'='+i(n));return
p.join('&');}function i(n){return encodeURIComponent(n).replace(/%5D/g,"]").repl
ace(/%5B/g,"[");}var j=/^(\w+)((?:\[\w*\])+)=?(.*)/;function k(n){if(!n)return {
};var o={};n=n.replace(/%5B/ig,'[').replace(/%5D/ig,']');n=n.split('&');var p=Ob
ject.prototype.hasOwnProperty;for(var q=0,r=n.length;q<r;q++){var s=n[q].match(j
);if(!s){var t=n[q].split('=');o[l(t[0])]=t[1]===undefined?null:l(t[1]);}else{va
r u=s[2].split(/\]\[|\[|\]/).slice(0,-1),v=s[1],w=l(s[3]||'');u[0]=v;var x=o;for
(var y=0;y<u.length-1;y++)if(u[y]){if(!p.call(x,u[y])){var z=u[y+1]&&!u[y+1].mat
ch(/^\d+$/)?{}:[];x[u[y]]=z;if(x[u[y]]!==z)return o;}x=x[u[y]];}else{if(u[y+1]&&
!u[y+1].match(/^\d+$/)){x.push({});}else x.push([]);x=x[x.length-1];}if(x instan
ceof Array&&u[u.length-1]===''){x.push(w);}else x[u[u.length-1]]=w;}}return o;}f
unction l(n){return decodeURIComponent(n.replace(/\+/g,' '));}var m={serialize:g
,encodeComponent:i,deserialize:k,decodeComponent:l};e.exports=m;});
__d("URIBase",["copyProperties","PHPQuerySerializer"],function(a,b,c,d,e,f){var
g=b('copyProperties'),h=b('PHPQuerySerializer'),i=/((([\-\w]+):\/\/)([^\/:]*)(:(
\d+))?)?([^#?]*)(\?([^#]*))?(#(.*))?/,j=new RegExp('[\\x00-\\x2c\\x2f\\x3b-\\x40
\\x5c\\x5e\\x60\\x7b-\\x7f'+'\\uFDD0-\\uFDEF\\uFFF0-\\uFFFF'+'\\u2047\\u2048\\uF
E56\\uFE5F\\uFF03\\uFF0F\\uFF1F]'),k=new RegExp('^(?:[^/]*:|'+'[\\x00-\\x1f]*/[\
\x00-\\x1f]*/)');function l(n,o,p){if(!o)return true;o=o.toString();var q=o.matc
h(i);n.setProtocol(q[3]||'');if(j.test(q[4]||'')&&!p)return false;n.setDomain(q[
4]||'');n.setPort(q[6]||'');n.setPath(q[7]||'');if(p){n.setQueryData(h.deseriali
ze(q[9])||{});}else try{n.setQueryData(h.deserialize(q[9])||{});}catch(r){return
false;}n.setFragment(q[11]||'');if(!n.getDomain()&&n.getPath().indexOf('\\')!==
-1)if(p){throw new Error('URI.parse: invalid URI (no domain but multiple back-sl
ashes)');}else return false;if(!n.getProtocol()&&k.test(o))if(p){throw new Error
('URI.parse: invalid URI (unsafe protocol-relative URLs)');}else return false;re
turn true;}function m(n){this._0='';this._1='';this._2='';this._3='';this._4='';
this._5={};l(this,n,true);}m.prototype.setProtocol=function(n){this._0=n;return
this;};m.prototype.getProtocol=function(n){return this._0;};m.prototype.setSecur
e=function(n){return this.setProtocol(n?'https':'http');};m.prototype.isSecure=f
unction(){return this.getProtocol()==='https';};m.prototype.setDomain=function(n
){if(j.test(n))throw new Error('URI.setDomain: unsafe domain specified.');this._
1=n;return this;};m.prototype.getDomain=function(){return this._1;};m.prototype.
setPort=function(n){this._2=n;return this;};m.prototype.getPort=function(){retur
n this._2;};m.prototype.setPath=function(n){this._3=n;return this;};m.prototype.
getPath=function(){return this._3;};m.prototype.addQueryData=function(n,o){if(n
instanceof Object){g(this._5,n);}else this._5[n]=o;return this;};m.prototype.set
QueryData=function(n){this._5=n;return this;};m.prototype.getQueryData=function(
){return this._5;};m.prototype.removeQueryData=function(n){if(!Array.isArray(n))
n=[n];for(var o=0,p=n.length;o<p;++o)delete this._5[n[o]];return this;};m.protot
ype.setFragment=function(n){this._4=n;return this;};m.prototype.getFragment=func
tion(){return this._4;};m.prototype.toString=function(){var n='';if(this._0)n+=t
his._0+'://';if(this._1)n+=this._1;if(this._2)n+=':'+this._2;if(this._3){n+=this
._3;}else if(n)n+='/';var o=h.serialize(this._5);if(o)n+='?'+o;if(this._4)n+='#'
+this._4;return n;};m.isValidURI=function(n){return l(new m(),n,false);};e.expor
ts=m;});
__d("goURI",[],function(a,b,c,d,e,f){function g(h,i,j){h=h.toString();if(!i&&a.P
ageTransitions&&PageTransitions.isInitialized()){PageTransitions.go(h,j);}else i
f(window.location.href==h){window.location.reload();}else window.location.href=h
;}e.exports=g;});
__d("URI",["URIBase","copyProperties","goURI"],function(a,b,c,d,e,f){var g=b('UR
IBase'),h=b('copyProperties'),i=b('goURI'),j=g,k=j&&j.prototype?j.prototype:j;fu
nction l(n){if(!(this instanceof l))return new l(n||window.location.href);j.call
(this,n||'');}for(var m in j)if(j.hasOwnProperty(m))l[m]=j[m];l.prototype=Object
.create(k);l.prototype.constructor=l;l.prototype.setPath=function(n){this.path=n

;return k.setPath.call(this,n);};l.prototype.getPath=function(){return k.getPath


.call(this).replace(/^\/+/,'/');};l.prototype.setProtocol=function(n){this.proto
col=n;return k.setProtocol.call(this,n);};l.prototype.setDomain=function(n){this
.domain=n;return k.setDomain.call(this,n);};l.prototype.setPort=function(n){this
.port=n;return k.setPort.call(this,n);};l.prototype.setFragment=function(n){this
.fragment=n;return k.setFragment.call(this,n);};l.prototype.isEmpty=function(){r
eturn !(this.getPath()||this.getProtocol()||this.getDomain()||this.getPort()||Ob
ject.keys(this.getQueryData()).length>0||this.getFragment());};l.prototype.value
Of=function(){return this.toString();};l.prototype.isFacebookURI=function(){if(!
l._5)l._5=new RegExp('(^|\\.)facebook\\.com([^.]*)$','i');return (!this.isEmpty(
)&&(!this.getDomain()||l._5.test(this.getDomain())));};l.prototype.getRegistered
Domain=function(){if(!this.getDomain())return '';if(!this.isFacebookURI())return
null;var n=this.getDomain().split('.'),o=n.indexOf('facebook');return n.slice(o
).join('.');};l.prototype.getUnqualifiedURI=function(){return new l(this).setPro
tocol(null).setDomain(null).setPort(null);};l.prototype.getQualifiedURI=function
(){return new l(this)._6();};l.prototype._6=function(){if(!this.getDomain()){var
n=l();this.setProtocol(n.getProtocol()).setDomain(n.getDomain()).setPort(n.getP
ort());}return this;};l.prototype.isSameOrigin=function(n){var o=n||window.locat
ion.href;if(!(o instanceof l))o=new l(o.toString());if(this.isEmpty()||o.isEmpty
())return false;if(this.getProtocol()&&this.getProtocol()!=o.getProtocol())retur
n false;if(this.getDomain()&&this.getDomain()!=o.getDomain())return false;if(thi
s.getPort()&&this.getPort()!=o.getPort())return false;return true;};l.prototype.
go=function(n){i(this,n);};l.prototype.setSubdomain=function(n){var o=this._6().
getDomain().split('.');if(o.length<=2){o.unshift(n);}else o[0]=n;return this.set
Domain(o.join('.'));};l.prototype.getSubdomain=function(){if(!this.getDomain())r
eturn '';var n=this.getDomain().split('.');if(n.length<=2){return '';}else retur
n n[0];};h(l,{getRequestURI:function(n,o){n=n===undefined||n;var p=a.PageTransit
ions;if(n&&p&&p.isInitialized()){return p.getCurrentURI(!!o).getQualifiedURI();}
else return new l(window.location.href);},getMostRecentURI:function(){var n=a.Pa
geTransitions;if(n&&n.isInitialized()){return n.getMostRecentURI().getQualifiedU
RI();}else return new l(window.location.href);},getNextURI:function(){var n=a.Pa
geTransitions;if(n&&n.isInitialized()){return n.getNextURI().getQualifiedURI();}
else return new l(window.location.href);},expression:/(((\w+):\/\/)([^\/:]*)(:(\
d+))?)?([^#?]*)(\?([^#]*))?(#(.*))?/,arrayQueryExpression:/^(\w+)((?:\[\w*\])+)=
?(.*)/,explodeQuery:function(n){if(!n)return {};var o={};n=n.replace(/%5B/ig,'['
).replace(/%5D/ig,']');n=n.split('&');var p=Object.prototype.hasOwnProperty;for(
var q=0,r=n.length;q<r;q++){var s=n[q].match(l.arrayQueryExpression);if(!s){var
t=n[q].split('=');o[l.decodeComponent(t[0])]=t[1]===undefined?null:l.decodeCompo
nent(t[1]);}else{var u=s[2].split(/\]\[|\[|\]/).slice(0,-1),v=s[1],w=l.decodeCom
ponent(s[3]||'');u[0]=v;var x=o;for(var y=0;y<u.length-1;y++)if(u[y]){if(!p.call
(x,u[y])){var z=u[y+1]&&!u[y+1].match(/^\d+$/)?{}:[];x[u[y]]=z;if(x[u[y]]!==z)re
turn o;}x=x[u[y]];}else{if(u[y+1]&&!u[y+1].match(/^\d+$/)){x.push({});}else x.pu
sh([]);x=x[x.length-1];}if(x instanceof Array&&u[u.length-1]===''){x.push(w);}el
se x[u[u.length-1]]=w;}}return o;},implodeQuery:function(n,o,p){o=o||'';if(p===u
ndefined)p=true;var q=[];if(n===null||n===undefined){q.push(p?l.encodeComponent(
o):o);}else if(n instanceof Array){for(var r=0;r<n.length;++r)try{if(n[r]!==unde
fined)q.push(l.implodeQuery(n[r],o?(o+'['+r+']'):r,p));}catch(s){}}else if(typeo
f(n)=='object'){if(('nodeName' in n)&&('nodeType' in n)){q.push('{node}');}else
for(var t in n)try{if(n[t]!==undefined)q.push(l.implodeQuery(n[t],o?(o+'['+t+']'
):t,p));}catch(s){}}else if(p){q.push(l.encodeComponent(o)+'='+l.encodeComponent
(n));}else q.push(o+'='+n);return q.join('&');},encodeComponent:function(n){retu
rn encodeURIComponent(n).replace(/%5D/g,"]").replace(/%5B/g,"[");},decodeCompone
nt:function(n){return decodeURIComponent(n.replace(/\+/g,' '));}});e.exports=l;}
);
__d("PluginOptin",["DOMEvent","DOMEventListener","PluginMessage","PopupWindow","
URI","UserAgent","copyProperties"],function(a,b,c,d,e,f){var g=b('DOMEvent'),h=b
('DOMEventListener'),i=b('PluginMessage'),j=b('PopupWindow'),k=b('URI'),l=b('Use
rAgent'),m=b('copyProperties');function n(o){m(this,{return_params:k.getRequestU
RI().getQueryData(),login_params:{},optin_params:{},plugin:o});this.addReturnPar
ams({ret:'optin'});delete this.return_params.hash;}m(n.prototype,{addReturnParam

s:function(o){m(this.return_params,o);return this;},addLoginParams:function(o){m
(this.login_params,o);return this;},addOptinParams:function(o){m(this.optin_para
ms,o);return this;},start:function(){var o=new k('/dialog/plugin.optin').addQuer
yData(this.optin_params).addQueryData({app_id:127760087237610,secure:k.getReques
tURI().isSecure(),social_plugin:this.plugin,return_params:JSON.stringify(this.re
turn_params),login_params:JSON.stringify(this.login_params)});if(l.mobile()){o.s
etSubdomain('m');}else o.addQueryData({display:'popup'});this.popup=j.open(o.toS
tring(),420,450);i.listen();return this;}});n.starter=function(o,p,q,r){var s=ne
w n(o);s.addReturnParams(p||{});s.addLoginParams(q||{});s.addOptinParams(r||{});
return s.start.bind(s);};n.listen=function(o,p,q,r,s){h.add(o,'click',function(t
){new g(t).kill();n.starter(p,q,r,s)();});};e.exports=n;});
__d("PluginPerms",["DOMEvent","DOMEventListener","PluginMessage","PopupWindow","
URI","copyProperties"],function(a,b,c,d,e,f){var g=b('DOMEvent'),h=b('DOMEventLi
stener'),i=b('PluginMessage'),j=b('PopupWindow'),k=b('URI'),l=b('copyProperties'
);function m(n,o){l(this,{return_params:k.getRequestURI().getQueryData(),login_p
arams:{},perms_params:{},perms:[],plugin:n,app:o});this.addReturnParams({ret:'pe
rms'});delete this.return_params.hash;}l(m.prototype,{addReturnParams:function(n
){l(this.return_params,n);},addLoginParams:function(n){l(this.login_params,n);},
addPermsParams:function(n){l(this.perms_params,n);},addPerms:function(n){this.pe
rms.push.apply(this.perms,n);},start:function(){var n=k('/dialog/plugin.perms').
addQueryData(this.perms_params).addQueryData({display:'popup',app_id:this.app,pe
rms:this.perms.join(','),secure:k.getRequestURI().isSecure(),social_plugin:this.
plugin,return_params:JSON.stringify(this.return_params),login_params:JSON.string
ify(this.login_params)});this.popup=j.open(n.toString(),210,450);i.listen();}});
m.starter=function(n,o,p,q,r,s){var t=new m(n,o);t.addReturnParams(q||{});t.addL
oginParams(r||{});t.addPermsParams(s||{});t.addPerms(p||[]);return t.start.bind(
t);};m.listen=function(n,o,p,q,r,s,t){h.add(n,'click',function(u){new g(u).kill(
);m.starter(o,p,q,r,s,t)();});};e.exports=m;});
__d("sprintf",[],function(a,b,c,d,e,f){function g(h,i){i=Array.prototype.slice.c
all(arguments,1);var j=0;return h.replace(/%s/g,function(k){return i[j++];});}e.
exports=g;});
__d("Log",["sprintf"],function(a,b,c,d,e,f){var g=b('sprintf'),h={DEBUG:3,INFO:2
,WARNING:1,ERROR:0};function i(k,l){var m=Array.prototype.slice.call(arguments,2
),n=g.apply(null,m),o=window.console;if(o&&j.level>=k)o[l in o?l:'log'](n);}var
j={level:-1,Level:h,debug:i.bind(null,h.DEBUG,'debug'),info:i.bind(null,h.INFO,'
debug'),warn:i.bind(null,h.WARNING,'debug'),error:i.bind(null,h.ERROR,'debug')};
e.exports=j;});
__d("function-extensions",["createArrayFrom"],function(a,b,c,d,e,f){var g=b('cre
ateArrayFrom');Function.prototype.curry=function(){var h=g(arguments);return thi
s.bind.apply(this,[null].concat(h));};Function.prototype.shield=function(h){if(t
ypeof this!='function')throw new TypeError();var i=this.bind.apply(this,g(argume
nts));return function(){return i();};};Function.prototype.defer=function(h,i){if
(typeof this!='function')throw new TypeError();h=h||0;return setTimeout(this,h,i
);};},3);
__d("event-form-bubbling",[],function(a,b,c,d,e,f){a.Event=a.Event||function(){}
;a.Event.__inlineSubmit=function(g,event){var h=(a.Event.__getHandler&&a.Event._
_getHandler(g,'submit'));return h?null:a.Event.__bubbleSubmit(g,event);};a.Event
.__bubbleSubmit=function(g,event){if(document.documentElement.attachEvent){var h
;while(h!==false&&(g=g.parentNode))h=g.onsubmit?g.onsubmit(event):a.Event.__fire
&&a.Event.__fire(g,'submit',event);return h;}};},3);
__d("DataStore",[],function(a,b,c,d,e,f){var g={},h=1;function i(l){if(typeof l=
='string'){return 'str_'+l;}else return 'elem_'+(l.__FB_TOKEN||(l.__FB_TOKEN=[h+
+]))[0];}function j(l){var m=i(l);return g[m]||(g[m]={});}var k={set:function(l,
m,n){if(!l)throw new TypeError('DataStore.set: namespace is required, got '+(typ
eof l));var o=j(l);o[m]=n;return l;},get:function(l,m,n){if(!l)throw new TypeErr
or('DataStore.get: namespace is required, got '+(typeof l));var o=j(l),p=o[m];if
(typeof p==='undefined'&&l.getAttribute)if(l.hasAttribute&&!l.hasAttribute('data
-'+m)){p=undefined;}else{var q=l.getAttribute('data-'+m);p=(null===q)?undefined:
q;}if((n!==undefined)&&(p===undefined))p=o[m]=n;return p;},remove:function(l,m){
if(!l)throw new TypeError('DataStore.remove: namespace is required, got '+(typeo

f l));var n=j(l),o=n[m];delete n[m];return o;},purge:function(l){delete g[i(l)];


}};e.exports=k;});
__d("Parent",["CSS"],function(a,b,c,d,e,f){var g=b('CSS'),h={byTag:function(i,j)
{j=j.toUpperCase();while(i&&i.nodeName!=j)i=i.parentNode;return i;},byClass:func
tion(i,j){while(i&&!g.hasClass(i,j))i=i.parentNode;return i;},byAttribute:functi
on(i,j){while(i&&(!i.getAttribute||!i.getAttribute(j)))i=i.parentNode;return i;}
};e.exports=h;});
__d("getObjectValues",["hasArrayNature"],function(a,b,c,d,e,f){var g=b('hasArray
Nature');function h(i){var j=[];for(var k in i)j.push(i[k]);return j;}e.exports=
h;});
__d("Event",["event-form-bubbling","Arbiter","DataStore","DOMQuery","DOMEvent","
ErrorUtils","Parent","UserAgent","$","copyProperties","getObjectValues"],functio
n(a,b,c,d,e,f){b('event-form-bubbling');var g=b('Arbiter'),h=b('DataStore'),i=b(
'DOMQuery'),j=b('DOMEvent'),k=b('ErrorUtils'),l=b('Parent'),m=b('UserAgent'),n=b
('$'),o=b('copyProperties'),p=b('getObjectValues'),q=a.Event;q.DATASTORE_KEY='Ev
ent.listeners';if(!q.prototype)q.prototype={};function r(ca){if(ca.type==='click
'||ca.type==='mouseover'||ca.type==='keydown')g.inform('Event/stop',{event:ca});
}function s(ca,da,ea){this.target=ca;this.type=da;this.data=ea;}o(s.prototype,{g
etData:function(){this.data=this.data||{};return this.data;},stop:function(){ret
urn q.stop(this);},prevent:function(){return q.prevent(this);},isDefaultPrevente
d:function(){return q.isDefaultPrevented(this);},kill:function(){return q.kill(t
his);},getTarget:function(){return new j(this).target||null;}});function t(ca){i
f(ca instanceof s)return ca;if(!ca)if(!window.addEventListener&&document.createE
ventObject){ca=window.event?document.createEventObject(window.event):{};}else ca
={};if(!ca._inherits_from_prototype)for(var da in q.prototype)try{ca[da]=q.proto
type[da];}catch(ea){}return ca;}o(q.prototype,{_inherits_from_prototype:true,get
RelatedTarget:function(){var ca=this.relatedTarget||(this.fromElement===this.src
Element?this.toElement:this.fromElement);return ca?n(ca):null;},getModifiers:fun
ction(){var ca={control:!!this.ctrlKey,shift:!!this.shiftKey,alt:!!this.altKey,m
eta:!!this.metaKey};ca.access=m.osx()?ca.control:ca.alt;ca.any=ca.control||ca.sh
ift||ca.alt||ca.meta;return ca;},isRightClick:function(){if(this.which)return th
is.which===3;return this.button&&this.button===2;},isMiddleClick:function(){if(t
his.which)return this.which===2;return this.button&&this.button===4;},isDefaultR
equested:function(){return this.getModifiers().any||this.isMiddleClick()||this.i
sRightClick();}});o(q.prototype,s.prototype);o(q,{listen:function(ca,da,ea,fa){i
f(typeof ca=='string')ca=n(ca);if(typeof fa=='undefined')fa=q.Priority.NORMAL;if
(typeof da=='object'){var ga={};for(var ha in da)ga[ha]=q.listen(ca,ha,da[ha],fa
);return ga;}if(da.match(/^on/i))throw new TypeError("Bad event name `"+da+"': u
se `click', not `onclick'.");if(ca.nodeName=='LABEL'&&da=='click'){var ia=ca.get
ElementsByTagName('input');ca=ia.length==1?ia[0]:ca;}else if(ca===window&&da==='
scroll'){var ja=i.getDocumentScrollElement();if(ja!==document.documentElement&&j
a!==document.body)ca=ja;}var ka=h.get(ca,v,{});if(x[da]){var la=x[da];da=la.base
;if(la.wrap)ea=la.wrap(ea);}z(ca,da);var ma=ka[da];if(!(fa in ma))ma[fa]=[];var
na=ma[fa].length,oa=new ba(ea,ma[fa],na);ma[fa].push(oa);return oa;},stop:functi
on(ca){var da=new j(ca).stopPropagation();r(da.event);return ca;},prevent:functi
on(ca){new j(ca).preventDefault();return ca;},isDefaultPrevented:function(ca){re
turn new j(ca).isDefaultPrevented(ca);},kill:function(ca){var da=new j(ca).kill(
);r(da.event);return false;},getKeyCode:function(event){event=new j(event).event
;if(!event)return false;switch(event.keyCode){case 63232:return 38;case 63233:re
turn 40;case 63234:return 37;case 63235:return 39;case 63272:case 63273:case 632
75:return null;case 63276:return 33;case 63277:return 34;}if(event.shiftKey)swit
ch(event.keyCode){case 33:case 34:case 37:case 38:case 39:case 40:return null;}r
eturn event.keyCode;},getPriorities:function(){if(!u){var ca=p(q.Priority);ca.so
rt(function(da,ea){return da-ea;});u=ca;}return u;},fire:function(ca,da,ea){var
fa=new s(ca,da,ea),ga;do{var ha=q.__getHandler(ca,da);if(ha)ga=ha(fa);ca=ca.pare
ntNode;}while(ca&&ga!==false&&!fa.cancelBubble);return ga!==false;},__fire:funct
ion(ca,da,event){var ea=q.__getHandler(ca,da);if(ea)return ea(t(event));},__getH
andler:function(ca,da){return h.get(ca,q.DATASTORE_KEY+da);},getPosition:functio
n(ca){ca=new j(ca).event;var da=i.getDocumentScrollElement(),ea=ca.clientX+da.sc
rollLeft,fa=ca.clientY+da.scrollTop;return {x:ea,y:fa};}});var u=null,v=q.DATAST

ORE_KEY,w=function(ca){return function(da){if(!i.contains(this,da.getRelatedTarg
et()))return ca.call(this,da);};},x;if(!window.navigator.msPointerEnabled){x={mo
useenter:{base:'mouseover',wrap:w},mouseleave:{base:'mouseout',wrap:w}};}else x=
{mousedown:{base:'MSPointerDown'},mousemove:{base:'MSPointerMove'},mouseup:{base
:'MSPointerUp'},mouseover:{base:'MSPointerOver'},mouseout:{base:'MSPointerOut'},
mouseenter:{base:'MSPointerOver',wrap:w},mouseleave:{base:'MSPointerOut',wrap:w}
};if(m.firefox()){var y=function(ca,event){event=t(event);var da=event.getTarget
();while(da){q.__fire(da,ca,event);da=da.parentNode;}};document.documentElement.
addEventListener('focus',y.curry('focusin'),true);document.documentElement.addEv
entListener('blur',y.curry('focusout'),true);}var z=function(ca,da){var ea='on'+
da,fa=aa.bind(ca,da),ga=h.get(ca,v);if(da in ga)return;ga[da]={};if(ca.addEventL
istener){ca.addEventListener(da,fa,false);}else if(ca.attachEvent)ca.attachEvent
(ea,fa);h.set(ca,v+da,fa);if(ca[ea]){var ha=ca===document.documentElement?q.Prio
rity._BUBBLE:q.Priority.TRADITIONAL,ia=ca[ea];ca[ea]=null;q.listen(ca,da,ia,ha);
}if(ca.nodeName==='FORM'&&da==='submit')q.listen(ca,da,q.__bubbleSubmit.curry(ca
),q.Priority._BUBBLE);},aa=k.guard(function(ca,event){event=t(event);if(!h.get(t
his,v))throw new Error("Bad listenHandler context.");var da=h.get(this,v)[ca];if
(!da)throw new Error("No registered handlers for `"+ca+"'.");if(ca=='click'){var
ea=l.byTag(event.getTarget(),'a');if(window.userAction){var fa=window.userActio
n('evt_ext',ea,event,{mode:'DEDUP'}).uai_fallback('click');if(window.ArbiterMoni
tor)window.ArbiterMonitor.initUA(fa,[ea]);}if(window.clickRefAction)window.click
RefAction('click',ea,event);}var ga=q.getPriorities();for(var ha=0;ha<ga.length;
ha++){var ia=ga[ha];if(ia in da){var ja=da[ia];for(var ka=0;ka<ja.length;ka++){i
f(!ja[ka])continue;var la=ja[ka].fire(this,event);if(la===false){return event.ki
ll();}else if(event.cancelBubble)event.stop();}}}return event.returnValue;});q.P
riority={URGENT:-20,TRADITIONAL:-10,NORMAL:0,_BUBBLE:1000};function ba(ca,da,ea)
{this._handler=ca;this._container=da;this._index=ea;}o(ba.prototype,{remove:func
tion(){delete this._handler;delete this._container[this._index];},fire:function(
ca,event){return k.applyWithGuard(this._handler,ca,[event],function(da){da.event
_type=event.type;da.dom_element=ca.name||ca.id;da.category='eventhandler';});}})
;a.$E=q.$E=t;e.exports=q;});
__d("isEmpty",[],function(a,b,c,d,e,f){function g(h){if(Array.isArray(h)){return
h.length===0;}else if(typeof h==='object'){for(var i in h)return false;return t
rue;}else return !h;}e.exports=g;});
__d("CSSLoader",["isEmpty"],function(a,b,c,d,e,f){var g=b('isEmpty'),h=20,i=5000
,j,k,l={},m=[],n,o={};function p(t){if(k)return;k=true;var u=document.createElem
ent('link');u.onload=function(){j=true;u.parentNode.removeChild(u);};u.rel='styl
esheet';u.href='data:text/css;base64,';t.appendChild(u);}function q(){var t,u=[]
,v=[];if(Date.now()>=n){for(t in o){v.push(o[t].signal);u.push(o[t].error);}o={}
;}else for(t in o){var w=o[t].signal,x=window.getComputedStyle?getComputedStyle(
w,null):w.currentStyle;if(x&&parseInt(x.height,10)>1){u.push(o[t].load);v.push(w
);delete o[t];}}for(var y=0;y<v.length;y++)v[y].parentNode.removeChild(v[y]);if(
!g(u)){for(y=0;y<u.length;y++)u[y]();n=Date.now()+i;}return g(o);}function r(t,u
,v,w){var x=document.createElement('meta');x.id='bootloader_'+t.replace(/[^a-z09]/ig,'_');u.appendChild(x);var y=!g(o);n=Date.now()+i;o[t]={signal:x,load:v,err
or:w};if(!y)var z=setInterval(function aa(){if(q())clearInterval(z);},h,false);}
var s={loadStyleSheet:function(t,u,v,w,x){if(l[t])throw new Error('CSS component
'+t+' has already been requested.');if(document.createStyleSheet){var y;for(var
z=0;z<m.length;z++)if(m[z].imports.length<31){y=z;break;}if(y===undefined){m.pu
sh(document.createStyleSheet());y=m.length-1;}m[y].addImport(u);l[t]={styleSheet
:m[y],uri:u};r(t,v,w,x);return;}var aa=document.createElement('link');aa.rel='st
ylesheet';aa.type='text/css';aa.href=u;l[t]={link:aa};if(j){aa.onload=function()
{aa.onload=aa.onerror=null;w();};aa.onerror=function(){aa.onload=aa.onerror=null
;x();};}else{r(t,v,w,x);if(j===undefined)p(v);}v.appendChild(aa);},registerLoade
dStyleSheet:function(t,u){if(l[t])throw new Error('CSS component '+t+' has been
requested and should not be '+'loaded more than once.');l[t]={link:u};},unloadSt
yleSheet:function(t){if(!t in l)return;var u=l[t],v=u.link;if(v){v.onload=v.oner
ror=null;v.parentNode.removeChild(v);}else{var w=u.styleSheet;for(var x=0;x<w.im
ports.length;x++)if(w.imports[x].href==u.uri){w.removeImport(x);break;}}delete o
[t];delete l[t];}};e.exports=s;});

__d("Bootloader",["function-extensions","CSSLoader","CallbackDependencyManager",
"createArrayFrom","ErrorUtils"],function(a,b,c,d,e,f){b('function-extensions');v
ar g=b('CSSLoader'),h=b('CallbackDependencyManager'),i=b('createArrayFrom'),j=b(
'ErrorUtils'),k={},l={},m={},n=null,o={},p={},q={},r=false,s=[],t=new h(),u=[];j
.addListener(function(z){z.loadingUrls=Object.keys(p);},true);function v(z,aa,ba
,ca){var da=y.done.curry([ba],z=='css',aa);p[aa]=true;if(z=='js'){var ea=documen
t.createElement('script');ea.src=aa;ea.async=true;var fa=o[ba];if(fa&&fa.crossOr
igin)ea.crossOrigin='anonymous';ea.onload=ea.onerror=da;ea.onreadystatechange=fu
nction(){if(this.readyState in {loaded:1,complete:1})da();};ca.appendChild(ea);}
else if(z=='css')g.loadStyleSheet(ba,aa,ca,da,function(){da();});}function w(z){
if(!o[z])return;if(o[z].type=='css'){g.unloadStyleSheet(z);delete k[z];t.unsatis
fyPersistentDependency(z);}}function x(z,aa){if(!r){s.push([z,aa]);return;}z=i(z
);var ba=[];for(var ca=0;ca<z.length;++ca){if(!z[ca])continue;var da=m[z[ca]];if
(da){var ea=da.resources;for(var fa=0;fa<ea.length;++fa)ba.push(ea[fa]);}}y.load
Resources(ba,aa);}var y={configurePage:function(z){var aa={},ba=y.resolveResourc
es(z),ca;for(ca=0;ca<ba.length;ca++){aa[ba[ca].src]=ba[ca];y.requested(ba[ca].na
me);}var da=document.getElementsByTagName('link');for(ca=0;ca<da.length;++ca){if
(da[ca].rel!='stylesheet')continue;for(var ea in aa)if(da[ca].href.indexOf(ea)!=
=-1){var fa=aa[ea].name;if(aa[ea].permanent)l[fa]=true;delete aa[ea];g.registerL
oadedStyleSheet(fa,da[ca]);y.done([fa],true);break;}}},loadComponents:function(z
,aa){z=i(z);var ba=[],ca=[];for(var da=0;da<z.length;da++){var ea=m[z[da]];if(ea
&&!ea.module)continue;var fa='legacy:'+z[da];if(m[fa]){z[da]=fa;ba.push(fa);}els
e if(ea&&ea.module){ba.push(z[da]);if(!ea.runWhenReady)ca.push(z[da]);}}x(z,ba.l
ength?d.curry(ba,aa):aa);},loadModules:function(z,aa){var ba=[],ca=[];for(var da
=0;da<z.length;da++){var ea=m[z[da]];if(!ea||ea.module)ba.push(z[da]);}x(z,d.cur
ry(ba,aa));},loadResources:function(z,aa,ba,ca){var da;z=y.resolveResources(i(z)
);if(ba){var ea={};for(da=0;da<z.length;++da)ea[z[da].name]=true;for(var fa in k
)if(!(fa in l)&&!(fa in ea)&&!(fa in q))w(fa);q={};}var ga=[],ha=[];for(da=0;da<
z.length;++da){var ia=z[da];if(ia.permanent)l[ia.name]=true;if(t.isPersistentDep
endencySatisfied(ia.name))continue;if(!ia.nonblocking)ha.push(ia.name);if(!k[ia.
name]){y.requested(ia.name);ga.push(ia);window.CavalryLogger&&window.CavalryLogg
er.getInstance().measureResources(ia,ca);}}var ja;if(aa)if(typeof aa==='function
'){ja=t.registerCallback(aa,ha);}else ja=t.addDependenciesToExistingCallback(aa,
ha);var ka=document.documentMode||+(/MSIE.(\d+)/.exec(navigator.userAgent)||[])[
1],la=y.getHardpoint(),ma=ka?la:document.createDocumentFragment();for(da=0;da<ga
.length;++da)v(ga[da].type,ga[da].src,ga[da].name,ma);if(la!==ma)la.appendChild(
ma);return ja;},requestResource:function(z,aa,ba){var ca=y.getHardpoint();v(z,aa
,ba,ca);},done:function(z,aa,ba){if(ba)delete p[ba];y.requested(z);if(!aa)for(va
r ca=0,da=u.length;ca<da;ca++)u[ca]();for(var ea=0;ea<z.length;++ea){var fa=z[ea
];if(fa!==undefined)t.satisfyPersistentDependency(fa);}},subscribeToLoadedResour
ces_DEPRECATED:function(z){u.push(z);},requested:function(z){z=i(z);for(var aa=0
;aa<z.length;++aa)if(z[aa]!==undefined)k[z[aa]]=true;},enableBootload:function(z
){for(var aa in z)if(!m[aa])m[aa]=z[aa];if(!r){r=true;for(var ba=0;ba<s.length;b
a++)x.apply(null,s[ba]);s=[];}},getHardpoint:function(){if(!n){var z=document.ge
tElementsByTagName('head');n=z.length&&z[0]||document.body;}return n;},setResour
ceMap:function(z){if(!z)return;var aa=[];for(var ba in z)if(!o[ba]){if(!z[ba].na
me)z[ba].name=ba;o[ba]=z[ba];if(o[ba].preloadable)aa.push(o[ba]);}y.loadResource
s(aa);},resolveResources:function(z){if(!z)return [];var aa=[];for(var ba=0;ba<z
.length;++ba)if(typeof z[ba]=='string'){if(z[ba] in o)aa.push(o[z[ba]]);}else aa
.push(z[ba]);return aa;},loadEarlyResources:function(z){y.setResourceMap(z);var
aa=[];for(var ba in z){var ca=o[ba];aa.push(ca);if(!ca.permanent)q[ca.name]=ca;}
y.loadResources(aa);}};e.exports=y;});
__d("emptyFunction",["copyProperties"],function(a,b,c,d,e,f){var g=b('copyProper
ties');function h(j){return function(){return j;};}function i(){}g(i,{thatReturn
s:h,thatReturnsFalse:h(false),thatReturnsTrue:h(true),thatReturnsNull:h(null),th
atReturnsThis:function(){return this;},thatReturnsArgument:function(j){return j;
}});e.exports=i;});
__d("evalGlobal",[],function(a,b,c,d,e,f){function g(h){if(typeof h!='string')th
row new TypeError('JS sent to evalGlobal is not a string. Only strings are permi
tted.');if(!h)return;var i=document.createElement('script');try{i.appendChild(do

cument.createTextNode(h));}catch(j){i.text=h;}var k=document.getElementsByTagNam
e('head')[0]||document.documentElement;k.appendChild(i);k.removeChild(i);}e.expo
rts=g;});
__d("HTML",["function-extensions","Bootloader","UserAgent","copyProperties","cre
ateArrayFrom","emptyFunction","evalGlobal"],function(a,b,c,d,e,f){b('function-ex
tensions');var g=b('Bootloader'),h=b('UserAgent'),i=b('copyProperties'),j=b('cre
ateArrayFrom'),k=b('emptyFunction'),l=b('evalGlobal');function m(n){if(n&&typeof
n.__html=='string')n=n.__html;if(!(this instanceof m)){if(n instanceof m)return
n;return new m(n);}this._content=n;this._defer=false;this._extra_action='';this
._nodes=null;this._inline_js=k;this._rootNode=null;return this;}m.isHTML=functio
n(n){return n&&(n instanceof m||n.__html!==undefined);};m.replaceJSONWrapper=fun
ction(n){return n&&n.__html!==undefined?new m(n.__html):n;};i(m.prototype,{toStr
ing:function(){var n=this._content||'';if(this._extra_action)n+='<script type="t
ext/javascript">'+this._extra_action+'</scr'+'ipt>';return n;},setAction:functio
n(n){this._extra_action=n;return this;},getAction:function(){this._fillCache();v
ar n=function(){this._inline_js();l(this._extra_action);}.bind(this);if(this.get
Deferred()){return n.defer.bind(n);}else return n;},setDeferred:function(n){this
._defer=!!n;return this;},getDeferred:function(){return this._defer;},getContent
:function(){return this._content;},getNodes:function(){this._fillCache();return
this._nodes;},getRootNode:function(){var n=this.getNodes();if(n.length===1){this
._rootNode=n[0];}else{var o=document.createDocumentFragment();for(var p=0;p<n.le
ngth;p++)o.appendChild(n[p]);this._rootNode=o;}return this._rootNode;},_fillCach
e:function(){if(null!==this._nodes)return;var n=this._content;if(!n){this._nodes
=[];return;}n=n.replace(/(<(\w+)[^>]*?)\/>/g,function(y,z,aa){return aa.match(/^
(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?y:z+'></'+aa+'>';});va
r o=n.trim().toLowerCase(),p=document.createElement('div'),q=false,r=(!o.indexOf
('<opt')&&[1,'<select multiple="multiple" class="__WRAPPER">','</select>'])||(!o
.indexOf('<leg')&&[1,'<fieldset class="__WRAPPER">','</fieldset>'])||(o.match(/^
<(thead|tbody|tfoot|colg|cap)/)&&[1,'<table class="__WRAPPER">','</table>'])||(!
o.indexOf('<tr')&&[2,'<table><tbody class="__WRAPPER">','</tbody></table>'])||((
!o.indexOf('<td')||!o.indexOf('<th'))&&[3,'<table><tbody><tr class="__WRAPPER">'
,'</tr></tbody></table>'])||(!o.indexOf('<col')&&[2,'<table><tbody></tbody><colg
roup class="__WRAPPER">','</colgroup></table>'])||null;if(null===r){p.className=
'__WRAPPER';if(h.ie()){r=[0,'<span style="display:none">&nbsp;</span>',''];q=tru
e;}else r=[0,'',''];}p.innerHTML=r[1]+n+r[2];while(r[0]--)p=p.lastChild;if(q)p.r
emoveChild(p.firstChild);p.className!='__WRAPPER';if(h.ie()){var s;if(!o.indexOf
('<table')&&-1==o.indexOf('<tbody')){s=p.firstChild&&p.firstChild.childNodes;}el
se if(r[1]=='<table>'&&-1==o.indexOf('<tbody')){s=p.childNodes;}else s=[];for(va
r t=s.length-1;t>=0;--t)if(s[t].nodeName&&s[t].nodeName.toLowerCase()=='tbody'&&
s[t].childNodes.length==0)s[t].parentNode.removeChild(s[t]);}var u=p.getElements
ByTagName('script'),v=[];for(var w=0;w<u.length;w++)if(u[w].src){v.push(g.reques
tResource.bind(g,'js',u[w].src));}else v.push(l.bind(null,u[w].innerHTML));for(v
ar w=u.length-1;w>=0;w--)u[w].parentNode.removeChild(u[w]);var x=function(){for(
var y=0;y<v.length;y++)v[y]();};this._nodes=j(p.childNodes);this._inline_js=x;}}
);e.exports=m;});
__d("isScalar",[],function(a,b,c,d,e,f){function g(h){return (/string|number|boo
lean/).test(typeof h);}e.exports=g;});
__d("Intl",[],function(a,b,c,d,e,f){var g;function h(j){if(typeof j!='string')re
turn false;return j.match(new RegExp(h.punct_char_class+'['+')"'+"'"+'\u00BB'+'\
u0F3B'+'\u0F3D'+'\u2019'+'\u201D'+'\u203A'+'\u3009'+'\u300B'+'\u300D'+'\u300F'+'
\u3011'+'\u3015'+'\u3017'+'\u3019'+'\u301B'+'\u301E'+'\u301F'+'\uFD3F'+'\uFF07'+
'\uFF09'+'\uFF3D'+'\\s'+']*$'));}h.punct_char_class='['+'.!?'+'\u3002'+'\uFF01'+
'\uFF1F'+'\u0964'+'\u2026'+'\u0EAF'+'\u1801'+'\u0E2F'+'\uFF0E'+']';function i(j)
{if(g){var k=[],l=[];for(var m in g.patterns){var n=g.patterns[m];for(var o in g
.meta){var p=new RegExp(o.slice(1,-1),'g'),q=g.meta[o];m=m.replace(p,q);n=n.repl
ace(p,q);}k.push(m);l.push(n);}for(var r=0;r<k.length;r++){var s=new RegExp(k[r]
.slice(1,-1),'g');if(l[r]=='javascript'){j.replace(s,function(t){return t.slice(
1).toLowerCase();});}else j=j.replace(s,l[r]);}}return j.replace(/\x01/g,'');}e.
exports={endsInPunct:h,applyPhonologicalRules:i,setPhonologicalRules:function(j)
{g=j;}};});

__d("tx",["Intl"],function(a,b,c,d,e,f){var g=b('Intl');function h(j,k){if(!k)re


turn j;var l='\\{([^}]+)\\}('+g.endsInPunct.punct_char_class+'*)',m=new RegExp(l
,'g'),n=[],o=j.replace(m,function(r,s,t){var u=k[s];if(u&&typeof u==='object'){n
.push(u);return '\x17'+t;}return u+(g.endsInPunct(u)?'':t);}).split('\x17').map(
g.applyPhonologicalRules);if(o.length===1)return o[0];var p=[o[0]];for(var q=0;q
<n.length;q++)p.push(n[q],o[q+1]);return p;}function i(j,k){if(typeof _string_ta
ble=='undefined')return;j=_string_table[j];return h(j,k);}i._=h;e.exports=i;});
__d("DOM",["function-extensions","DOMQuery","Event","HTML","UserAgent","$","copy
Properties","createArrayFrom","isScalar","tx"],function(a,b,c,d,e,f){b('function
-extensions');var g=b('DOMQuery'),h=b('Event'),i=b('HTML'),j=b('UserAgent'),k=b(
'$'),l=b('copyProperties'),m=b('createArrayFrom'),n=b('isScalar'),o=b('tx'),p='j
s_',q=0,r={};l(r,g);l(r,{create:function(u,v,w){var x=document.createElement(u);
if(v)r.setAttributes(x,v);if(w!=null)r.setContent(x,w);return x;},setAttributes:
function(u,v){if(v.type)u.type=v.type;for(var w in v){var x=v[w],y=(/^on/i).test
(w);if(w=='type'){continue;}else if(w=='style'){if(typeof x=='string'){u.style.c
ssText=x;}else l(u.style,x);}else if(y){h.listen(u,w.substr(2),x);}else if(w in
u){u[w]=x;}else if(u.setAttribute)u.setAttribute(w,x);}},prependContent:function
(u,v){return s(v,u,function(w){u.firstChild?u.insertBefore(w,u.firstChild):u.app
endChild(w);});},insertAfter:function(u,v){var w=u.parentNode;return s(v,w,funct
ion(x){u.nextSibling?w.insertBefore(x,u.nextSibling):w.appendChild(x);});},inser
tBefore:function(u,v){var w=u.parentNode;return s(v,w,function(x){w.insertBefore
(x,u);});},setContent:function(u,v){r.empty(u);return r.appendContent(u,v);},app
endContent:function(u,v){return s(v,u,function(w){u.appendChild(w);});},replace:
function(u,v){var w=u.parentNode;return s(v,w,function(x){w.replaceChild(x,u);})
;},remove:function(u){u=k(u);if(u.parentNode)u.parentNode.removeChild(u);},empty
:function(u){u=k(u);while(u.firstChild)r.remove(u.firstChild);},getID:function(u
){var v=u.id;if(!v){v=p+q++;u.id=v;}return v;}});function s(u,v,w){u=i.replaceJS
ONWrapper(u);if(u instanceof i&&''===v.innerHTML&&-1===u.toString().indexOf('<sc
r'+'ipt')){var x=j.ie();if(!x||(x>7&&!g.isNodeOfType(v,['table','tbody','thead',
'tfoot','tr','select','fieldset']))){var y=x?'<em style="display:none;">&nbsp;</
em>':'';v.innerHTML=y+u;x&&v.removeChild(v.firstChild);return m(v.childNodes);}}
else if(g.isTextNode(v)){v.data=u;return [u];}var z=document.createDocumentFragm
ent(),aa,ba=[],ca=[];if(!Array.isArray(u))u=[u];for(var da=0;da<u.length;da++){a
a=i.replaceJSONWrapper(u[da]);if(aa instanceof i){ca.push(aa.getAction());var ea
=aa.getNodes();for(var fa=0;fa<ea.length;fa++){ba.push(ea[fa]);z.appendChild(ea[
fa]);}}else if(n(aa)){var ga=document.createTextNode(aa);ba.push(ga);z.appendChi
ld(ga);}else if(g.isNode(aa)){ba.push(aa);z.appendChild(aa);}}w(z);ca.forEach(fu
nction(ha){ha();});return ba;}function t(u){function v(w){return r.create('div',
{},w).innerHTML;}return function(w,x){var y={};if(x)for(var z in x)y[z]=v(x[z]);
return i(u(w,y));};}r.tx=t(o);r.tx._=r._tx=t(o._);e.exports=r;});
__d("isInIframe",[],function(a,b,c,d,e,f){function g(){return window!=window.top
;}e.exports=g;});
__d("resolveWindow",[],function(a,b,c,d,e,f){function g(h){var i=window,j=h.spli
t('.');try{for(var l=0;l<j.length;l++){var m=j[l],n=/^frames\[['"]?([a-zA-Z0-9\_]+)['"]?\]$/.exec(m);if(n){i=i.frames[n[1]];}else if(m==='opener'||m==='parent'
||m==='top'){i=i[m];}else return null;}}catch(k){return null;}return i;}e.export
s=g;});
__d("XD",["function-extensions","Arbiter","DOM","DOMDimensions","Log","URI","cop
yProperties","isInIframe","resolveWindow"],function(a,b,c,d,e,f){b('function-ext
ensions');var g=b('Arbiter'),h=b('DOM'),i=b('DOMDimensions'),j=b('Log'),k=b('URI
'),l=b('copyProperties'),m=b('isInIframe'),n=b('resolveWindow'),o='fb_xdm_frame_
'+location.protocol.replace(':',''),p={_callbacks:[],_opts:{autoResize:false,all
owShrink:true,channelUrl:null,hideOverflow:false,resizeTimeout:1000,resizeWidth:
false,expectResizeAck:false,resizeAckTimeout:6000},_lastResizeAckId:0,_resizeCou
nt:0,_resizeTimestamp:0,_shrinker:null,init:function(r){this._opts=l(l({},this._
opts),r);if(this._opts.autoResize)this._startResizeMonitor();g.subscribe('Connec
t.Unsafe.resize.ack',function(s,t){if(!t.id)t.id=this._resizeCount;if(t.id>this.
_lastResizeAckId)this._lastResizeAckId=t.id;}.bind(this));},send:function(r,s){s
=s||this._opts.channelUrl;if(!s)return;var t={},u=new k(s);l(t,r);l(t,k.explodeQ
uery(u.getFragment()));var v=new k(t.origin),w=v.getDomain()+(v.getPort()?':'+v.

getPort():''),x=n(t.relation.replace(/^parent\./,'')),y=50,z=function(){var aa=x
.frames[o];try{aa.proxyMessage(k.implodeQuery(t),[w]);}catch(ba){if(--y){setTime
out(z,100);}else j.warn('No such frame "'+o+'" to proxyMessage to');}};z();},_co
mputeSize:function(){var r=i.getDocumentDimensions(),s=0;if(this._opts.resizeWid
th){var t=document.body;if(t.clientWidth<t.scrollWidth){s=r.width;}else{var u=t.
childNodes;for(var v=0;v<u.length;v++){var w=u[v],x=w.offsetLeft+w.offsetWidth;i
f(x>s)s=x;}}s=Math.max(s,p.forced_min_width);}r.width=s;if(this._opts.allowShrin
k){if(!this._shrinker)this._shrinker=h.create('div');h.appendContent(document.bo
dy,this._shrinker);r.height=Math.max(this._shrinker.offsetTop,0);}return r;},_st
artResizeMonitor:function(){var r,s=document.documentElement;if(this._opts.hideO
verflow){s.style.overflow='hidden';document.body.style.overflow='hidden';}var t=
(function(){var u=this._computeSize(),v=Date.now(),w=this._lastResizeAckId<this.
_resizeCount&&(v-this._resizeTimestamp)>this._opts.resizeAckTimeout;if(!r||(this
._opts.expectResizeAck&&w)||(this._opts.allowShrink&&r.width!=u.width)||(!this._
opts.allowShrink&&r.width<u.width)||(this._opts.allowShrink&&r.height!=u.height)
||(!this._opts.allowShrink&&r.height<u.height)){r=u;this._resizeCount++;this._re
sizeTimestamp=v;var x={type:'resize',height:u.height,ackData:{id:this._resizeCou
nt}};if(u.width&&u.width!=0)x.width=u.width;try{if(k(document.referrer).isFacebo
okURI()&&m()&&window.name&&window.parent.location&&window.parent.location.toStri
ng&&k(window.parent.location).isFacebookURI()){var z=window.parent.document.getE
lementsByTagName('iframe');for(var aa=0;aa<z.length;aa=aa+1)if(z[aa].name==windo
w.name){if(this._opts.resizeWidth)z[aa].style.width=x.width+'px';z[aa].style.hei
ght=x.height+'px';}}this.send(x);}catch(y){this.send(x);}}}).bind(this);t();setI
nterval(t,this._opts.resizeTimeout);}},q=l({},p);e.exports.UnverifiedXD=q;e.expo
rts.XD=p;a.UnverifiedXD=q;a.XD=p;});
__d("UnverifiedXD",["XD","XDUnverifiedChannel"],function(a,b,c,d,e,f){var g=b('X
D').UnverifiedXD,h=c('XDUnverifiedChannel').channel;g.init({channelUrl:h});e.exp
orts=g;});
__d("PluginResize",["Log","UnverifiedXD","copyProperties"],function(a,b,c,d,e,f)
{var g=b('Log'),h=b('UnverifiedXD'),i=b('copyProperties');function j(m){m=m||doc
ument.body;return m.offsetWidth+m.offsetLeft;}function k(m){m=m||document.body;r
eturn m.offsetHeight+m.offsetTop;}function l(m,n,event,o){this.calcWidth=m||j;th
is.calcHeight=n||k;this.width=undefined;this.height=undefined;this.reposition=!!
o;this.event=event||'resize';}i(l.prototype,{resize:function(){var m=this.calcWi
dth(),n=this.calcHeight();if(m!==this.width||n!==this.height){g.debug('Resizing
Plugin: (%s, %s, %s, %s)',m,n,this.event,this.reposition);this.width=m;this.heig
ht=n;h.send({type:this.event,width:m,height:n,reposition:this.reposition});}retu
rn this;},auto:function(m){setInterval(this.resize.bind(this),m||250);return thi
s;}});l.auto=function(m,event,n){return new l(j.bind(null,m),k.bind(null,m),even
t).resize().auto(n);};l.autoHeight=function(m,n,event,o){return new l(function()
{return m;},k.bind(null,n),event).resize().auto(o);};e.exports=l;});/*
WebSpectator 3.1.14.20130322 (170745.839)
*/
var JSON;
JSON||(JSON={},function(){function V(e){return 10>e?"0"+e:e}function u(e){C.last
Index=0;return C.test(e)?'"'+e.replace(C,function(e){var n=W[e];return"string"==
=typeof n?n:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"
'}function r(e,C){var G,N,X,W,ka=n,P,A=C[e];A&&("object"===typeof A&&"function"=
==typeof A.toJSON)&&(A=A.toJSON(e));"function"===typeof R&&(A=R.call(C,e,A));swi
tch(typeof A){case "string":return u(A);case "number":return isFinite(A)?String(
A):"null";case "boolean":case "null":return String(A);case "object":if(!A)return
"null";
n+=v;P=[];if("[object Array]"===Object.prototype.toString.apply(A)){W=A.length;f
or(G=0;G<W;G+=1)P[G]=r(G,A)||"null";X=0===P.length?"[]":n?"[\n"+n+P.join(",\n"+n
)+"\n"+ka+"]":"["+P.join(",")+"]";n=ka;return X}if(R&&"object"===typeof R){W=R.l
ength;for(G=0;G<W;G+=1)"string"===typeof R[G]&&(N=R[G],(X=r(N,A))&&P.push(u(N)+(
n?": ":":")+X))}else for(N in A)Object.prototype.hasOwnProperty.call(A,N)&&(X=r(
N,A))&&P.push(u(N)+(n?": ":":")+X);X=0===P.length?"{}":n?"{\n"+n+P.join(",\n"+n)
+"\n"+ka+"}":"{"+P.join(",")+
"}";n=ka;return X}}"function"!==typeof Date.prototype.toJSON&&(Date.prototype.to

JSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+V(this
.getUTCMonth()+1)+"-"+V(this.getUTCDate())+"T"+V(this.getUTCHours())+":"+V(this.
getUTCMinutes())+":"+V(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=N
umber.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()
});var e=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f
\u2060-\u206f\ufeff\ufff0-\uffff]/g,
C=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u20
28-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n,v,W={"\b":"\\b","\t":"\\t","\n":"
\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},R;"function"!==typeof JSON.str
ingify&&(JSON.stringify=function(e,C,G){var N;v=n="";if("number"===typeof G)for(
N=0;N<G;N+=1)v+=" ";else"string"===typeof G&&(v=G);if((R=C)&&"function"!==typeof
C&&("object"!==typeof C||"number"!==typeof C.length))throw Error("JSON.stringif
y");return r("",{"":e})});
"function"!==typeof JSON.parse&&(JSON.parse=function(n,r){function C(e,n){var v,
u,A=e[n];if(A&&"object"===typeof A)for(v in A)Object.prototype.hasOwnProperty.ca
ll(A,v)&&(u=C(A,v),void 0!==u?A[v]=u:delete A[v]);return r.call(e,n,A)}var v,n=S
tring(n);e.lastIndex=0;e.test(n)&&(n=n.replace(e,function(e){return"\\u"+("0000"
+e.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(n.replace(/\
\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|
-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return v=eval("("+n+")"),"function"===t
ypeof r?C({"":v},""):v;throw new SyntaxError("JSON.parse");})}());
(function(V){function u(){this._events={};this._maxListeners=10}function r(e,r,n
,v,u){this.type=e;this.listener=r;this.scope=n;this.once=v;this.instance=u}r.pro
totype.fire=function(e){this.listener.apply(this.scope||this,e);if(this.once)ret
urn this.instance.removeListener(this.type,this.listener),!1};u.prototype.eachLi
stener=function(e,r){var n=null,v=null,u=null;if(this._events.hasOwnProperty(e))
{v=this._events[e];for(n=0;n<v.length;n+=1)if(u=r.call(this,v[n],n),!1===u)n-=1;
else if(!0===u)break}return this};
u.prototype.addListener=function(e,C,n,v){this._events.hasOwnProperty(e)||(this.
_events[e]=[]);this._events[e].push(new r(e,C,n,v,this));this.emit("newListener"
,e,C,n,v);this._maxListeners&&(!this._events[e].warned&&this._events[e].length>t
his._maxListeners)&&("undefined"!==typeof console&&console.warn("Possible EventE
mitter memory leak detected. "+this._events[e].length+" listeners added. Use emi
tter.setMaxListeners() to increase limit."),this._events[e].warned=!0);return th
is};u.prototype.on=u.prototype.addListener;
u.prototype.once=function(e,r,n){return this.addListener(e,r,n,!0)};u.prototype.
removeListener=function(e,r){this.eachListener(e,function(n,v){n.listener===r&&t
his._events[e].splice(v,1)});this._events[e]&&0===this._events[e].length&&delete
this._events[e];return this};u.prototype.removeAllListeners=function(e){e&&this
._events.hasOwnProperty(e)?delete this._events[e]:e||(this._events={});return th
is};u.prototype.listeners=function(e){if(this._events.hasOwnProperty(e)){var r=[
];this.eachListener(e,
function(e){r.push(e.listener)});return r}return[]};u.prototype.emit=function(e)
{for(var r=[],n=null,n=1;n<arguments.length;n+=1)r.push(arguments[n]);this.eachL
istener(e,function(e){return e.fire(r)});return this};u.prototype.setMaxListener
s=function(e){this._maxListeners=e;return this};V.EventEmitter=u})(this);
(function(){var V,u={version:"3.1.14.20130322"},r="undefined"!=typeof u?u:{versi
on:"0.0.0"},e=r.core={},C=[],n,v,W,R,T=new function(){var a=new EventEmitter;a.s
etMaxListeners(50);this.listeners=function(b){return a.listeners(b)};this.listen
=function(b,c,h){b||K("!invalid event name: '"+b+"'");a.addListener(b,c,h)};this
.unlisten=function(b,c){a.removeListener(b,c)};this.emit=function(b){e.log("emit
ting event: "+b,"core");a.emit.apply(a,Array.prototype.slice.call(arguments,0))}
},K=function(a,b){e.log(a,
"core",b)},G=new function(a){if(!a)throw Error("script parameters not found!");t
his.getParam=function(b,c,h,g){b=a[b];null==b?b=h:g&&(b="1"===b?!0:!1);return b}
;this.toString=function(){var a=[];if("undefined"!==typeof window._wsvars)for(i
in window._wsvars)a.push(i+" : '"+window._wsvars[i]+"'");return a.sort().join("\
n")}}(window._wsvars);e.id=(+new Date+"").slice(-4);e.extendAPI=function(a){N.ex
tend(a)};var N=new function(a,b){var c=a[b]={};this.extend=function(a){for(var b

in a)c[b]=a[b]};this.getObject=
function(){return c}}(window,"WS");e.extension=new function(){var a={};this.make
=function(b,c,h){var g=a[b];null==g&&(g=[],a[b]=g);g.push(c);return function(){v
ar c=a[b],g=null,d=Array.prototype.slice.apply(arguments),p=d.length;d.push(null
);for(var e=0;e<c.length;e++)g=c[e].apply(h?h:this,d),d[p]=g;return g}};this.add
=function(b,c){a[b].push(c)}};e.zone=new function(a){var b={},c=function(a,b,c){
this.constructor.prototype.init.apply(this,arguments)};c.prototype=new function(
a){this.log=function(b){a.log(b,
"zone '"+this.id+"'")};this.init=a.extension.make("core.zone.init",function(b,c,
h){this.id=b||c.getAttribute(a.globalParameters.attZoneId)||"";this.bannerId=a.u
til.trim(c.getAttribute(a.globalParameters.attBannerId)||"");this.element=c;this
.options=h;this.log("initCore")});this.start=a.extension.make("core.zone.start",
function(){this.log("startCore")});this.del=a.extension.make("core.zone.del",fun
ction(){this.log("deleted zone: "+this)});this.getData=a.extension.make("core.zo
ne.getdata",function(){return{id:this.id,
bannerId:this.bannerId}});var b=a.extension.make("core.zone.tostring",function(a
){var b={};b.id=a.id;b.bannerId=a.bannerId;return b});this.toString=function(){r
eturn JSON.stringify(b(this))}}(a);c.prototype.constructor=c;var h=function(g,h,
l){g=a.util.trim(g);null!=b[g]?g=null:(g=new c(g,h,l),b[g.id]=g,g.start(),K("cre
ated zone: "+g.toString()));return g};this.getZone=function(a){return b[a]};this
.eachZone=function(a,c){var h,d;for(d in b)if(h=a(b[d],d),"undefined"!=typeof h&
&!1==h)break;c&&c()};
this.deleteZone=function(a,c){var h,c=c||{};return(h=c.zone)||(h=b[a])?(delete b
[a],h.del(),!0):!1};this.createZone=function(a,b,c){return h(a,b,c)};this.clearZ
ones=function(){for(var a in b)this.deleteZone(a,{zone:b[a]})};this.parseZones=f
unction(){var b,c,l=0;K("parsing '"+e.globalParameters.zoneClassName+"' class fo
r ad zone");c=document.getElementsByClassName(e.globalParameters.zoneClassName);
for(var d=0,p=c.length;d<p;d++)b=c[d],h(b.getAttribute(a.globalParameters.attZon
eId),b,{timeStamp:a.startTimeStamp})&&
l++;K("parseZones: created "+l+" zone(s)")};this.getPrototype=function(){return
c.prototype};this.zones=function(){return b}}(e);e.events=new function(a,b){this
.eventType={};this.listen=function(a,b,c){T.listen(a,b,c)};this.unlisten=functio
n(a,b){T.unlisten(a,b)};this.emit=function(a,b){T.emit.apply(T,Array.prototype.s
lice.call(arguments,0))};for(var c=this.eventType,h=0,g=b.length;h<g;h++)c[b[h]]
=b[h]}(e,"viewportChanged scroll resize focus blur zoneIn zoneOut zoneInTentativ
e bannerIn bannerOut bannerInTentative bannerPrint bannerResize campaignBannerPr
int messageSent messageReceived messageChangeBanner instrumentationLoaded ortcCo
nnected ortcDisconnected".split(" "));
e.util=new function(a){this.scriptEvents={focusStatusChanged:"ws_focusStatusChan
ged",connectionStatusChanged:"ws_connectionStatusChanged",zoneStatusChanged:"ws_
zoneStatusChanged",userStatusChanged:"ws_userStatusChanged",scriptStatusChanged:
"ws_scriptStatusChanged"};this.DOM=new function(){var a=/px/,b=function(b){b=b.r
eplace(a,"");return""==b||"auto"==b?0:parseInt(b)};this.getElementCss=function(a
){var b=null;a.currentStyle?b=a.currentStyle:window.getComputedStyle&&(b=documen
t.defaultView.getComputedStyle(a,
null));return b};this.getElementWidth=function(a){return a.offsetWidth||b(this.g
etElementCss(a).width)||b(a.style.width)};this.getElementHeight=function(a){retu
rn a.offsetHeight||b(this.getElementCss(a).height)||b(a.style.height)}};this.exe
cuteOnPredicate=function(a,b,c,l){var l=l||0,d=this;5<=l?K("executeOnPredicate:
max tries reached ("+l+") for function:"+a):b()?a():(l++,setTimeout(function(){d
.executeOnPredicate.call(d,a,b,c,l)},c||1E3))};this.PartialTimer=function(){var
a=0,b=0;this.start=function(c){a=
c||+new Date;b=0};this.stop=function(c){if(0==a)return 0;b=c||+new Date;return b
-a};this.on=function(){return 0<a};this.startTime=function(){return a};this.toJS
ON=function(){var c={};c.begin=a;c.end=b;c.elapsed=0==b?0:b-a;return c}};this.tr
im=function(a){return(a||"").replace(/^\s+|\s+$/g,"")};this.isArray=function(a){
return a&&"object"===typeof a&&"number"===typeof a.length&&"function"===typeof a
.splice&&!a.propertyIsEnumerable("length")};this.ts=function(){var a=new Date;re
turn""+a.getFullYear()+
("0"+(a.getMonth()+1)).slice(-2)+("0"+a.getDate()).slice(-2)+" "+("0"+a.getHours

()).slice(-2)+("0"+a.getMinutes()).slice(-2)+("0"+a.getSeconds()).slice(-2)+"."+
("00"+a.getMilliseconds()).slice(-3)};var b;"undefined"===typeof console&&(windo
w.console={tlog:"",log:function(){return!0}});this.logger={log:function(c,g){var
d="("+a.id+") ["+this.ts()+"] "+(g?"["+g+"] ":"")+c;(!b||d.match(b))&&console.l
og(d)},filter:function(a){b=a?RegExp(a,"i"):!1}};this.log=this.logger.log;this.r
aiseEvent=function(a,
b,c,d){b=b||{};b.id=e.id;b.index=R;c=!!c;d=!!d;if(document.createEvent){var x=do
cument.createEvent("CustomEvent");x.initCustomEvent(a,c,d,b);document.dispatchEv
ent(x)}else if(document.name)for(func in document.name)document.name[func](b)};t
his.bindEvent=function(a,b,c){document.addEventListener?a.addEventListener(b,c):
document.createEvent?a.attachEvent(b,c):(a.name||(a.name=[]),a.name.push(c))};th
is.viewport=new function(){this.scrollTop=function(){var a;a=window.pageYOffset?
window.pageYOffset:document.body.scrollTop?
document.body.scrollTop:document.documentElement.scrollTop;"undefined"==typeof a
&&(a=0);return a};this.scrollLeft=function(){var a;a=window.pageXOffset?window.p
ageXOffset:document.body.scrollLeft?document.body.scrollLeft:document.documentEl
ement.scrollLeft;"undefined"==typeof a&&(a=0);return a};this.height=function(){r
eturn document.documentElement.clientHeight||window.innerHeight||document.body.c
lientHeight};this.width=function(){return document.documentElement.clientWidth||
window.innerWidth||document.body.clientWidth}};
this.cookies=new function(){this.createCookie=function(a,b,c){if(c){var d=new Da
te;d.setTime(d.getTime()+864E5*c);c="; expires="+d.toGMTString()}else c="";docum
ent.cookie=a+"="+b+c+"; path=/"};this.readCookie=function(a){for(var a=a+"=",b=d
ocument.cookie.split(";"),c=0;c<b.length;c++){for(var d=b[c];" "==d.charAt(0);)d
=d.substring(1,d.length);if(0==d.indexOf(a))return d.substring(a.length,d.length
)}return null};this.eraseCookie=function(a){this.createCookie(a,"",-1)}};var c=[
];this.bind=function(a,
b,d,l){l=l||{};l.prefix="undefined"!=typeof l.prefix?l.prefix:!0;document.addEve
ntListener?a.addEventListener(b,d):a.attachEvent((l.prefix?"on":"")+b,d);l.auto&
&c.push({t:a,e:b,cb:d})};this.unbindAll=function(){for(var a=c.length,b;a--;)b=c
[a],b.t.detachEvent?b.t.detachEvent("on"+b.e,b.cb):b.t.removeEventListener(b.e,b
.cb)}}(e);e.register=function(a,b,c){r[a]=b;C.push(b);b.log=function(b,c){e.log(
b,c||a)};for(var h in c)T.listen(h,c[h],r[a]);K("registered module: '"+a+"'")};e
.getParam=function(a,
b,c,h,g){a=G.getParam(a,b,c,h);K(b+":'"+a+"'",g);return a};e.log=function(a,b,c)
{(v||c)&&e.util.log(a,b)};e.init=function(){n=r.instrumentation;e.util.bind(wind
ow,"scroll",function(){var a=0,b;return function(g){clearTimeout(b);K("scroll:"+
++a);b=setTimeout(function(){T.emit("scroll",g)},200)}}(),{auto:!0});e.util.bin
d(window,"resize",function(){var a=0,b;return function(g){clearTimeout(b);K("res
ize:"+ ++a);b=setTimeout(function(){T.emit("resize",g)},200)}}(),{auto:!0});e.ut
il.bind(window,"blur",
function(){var a=0,b;return function(g){clearTimeout(b);K("blur:"+ ++a);b=setTim
eout(function(){T.emit("blur",g)},200)}}(),{auto:!0});e.util.bind(window,"focus"
,function(){var a=0,b;return function(g){clearTimeout(b);K("focus:"+ ++a);b=setT
imeout(function(){T.emit("focus",g)},200)}}(),{auto:!0});for(var a=0,b=C.length;
a<b;a++)C[a].init&&C[a].init();W&&e.util.logger.filter(W);e.startTimeStamp=+new
Date;e.zone.parseZones(!0);a=0;for(b=C.length;a<b;a++)C[a].ready&&C[a].ready();e
.util.raiseEvent(e.util.scriptEvents.scriptStatusChanged,
{action:"ready"});K("init core")};e.reset=function(){e.util.unbindAll();for(var
a=0,b=C.length;a<b;a++)C[a].reset&&C[a].reset()};v=e.getParam("dbg","debugOn",!1
,!0);e.globalParameters={};e.globalParameters.attZoneId="data-pid";e.globalParam
eters.attBannerId="data-bid";e.globalParameters.attBannerWidth="data-bannerWidth
";e.globalParameters.attBannerHeight="data-bannerHeight";e.globalParameters.attC
ampaignId="data-cpid";e.globalParameters.attFirstPrint="data-fp";e.globalParamet
ers.attDisplayTime="data-dt";
e.globalParameters.attImpressionId="data-iid";e.globalParameters.attRemnant="dat
a-remnant";e.globalParameters.attTracker="data-tracker";e.globalParameters.attCl
ose="data-close";e.globalParameters.attContentUrl="data-contenturl";e.globalPara
meters.sessionId=e.getParam("sessionId","sessionId","0");e.globalParameters.cont
extId=e.getParam("contextId","contextId","0");e.globalParameters.websiteId=e.get

Param("wid","websiteId","");e.globalParameters.msgVersion=e.getParam("mve","mess
ageVersion","");e.globalParameters.zoneClassName=
e.getParam("zcn","zoneClassName","wsz");W=e.getParam("lfe","logFilterExp","");e.
InitOnLoad=e.getParam("iol","initOnLoad",!0,!0);e.InitOnPageLoad=e.getParam("ipl
","initOnPageLoad",!1,!0);"undefined"==typeof document.getElementsByClassName&&(
e.util.bind(window.document,"focusin",function(){var a=0,b;return function(c){cl
earTimeout(b);K("focus:"+ ++a);b=setTimeout(function(){T.emit("focus",c)},200)}}
()),e.util.bind(window.document,"focusout",function(){var a=0,b;return function(
c){clearTimeout(b);K("blur:"+
++a);b=setTimeout(function(){T.emit("blur",c)},200)}}()));Array.prototype.indexO
f||(Array.prototype.indexOf=function(a,b){for(var c=b||0,h=this.length;c<h;c++)i
f(this[c]===a)return c;return-1});document.getElementsByClassName||(document.get
ElementsByClassName=function(a){for(var b=[],a=RegExp("\\b"+a+"\\b"),c,h=this.ge
tElementsByTagName("*"),g=h.length;g--;)c=h[g],1==c.nodeType&&a.test(c.className
)&&b.push(c);return b});R=(new function(){var a=window.WS_SCRIPTS||(window.WS_SC
RIPTS=[]);this.add=function(b){a.push(b);
return a.length-1};this.get=function(b){return a[b]}}).add(N.getObject());e.exte
ndAPI({id:e.id,version:r.version,index:R,init:function(){e.init()}});var X=funct
ion(){v=!v;return"log "+(v?"on":"off")},ic=function(a){if(a&&"?"===a[0])return"a
rguments: filter regex [string];";a=a?a[0]:null;e.util.logger.filter(a);return a
?"set log filter to '"+a+"'":"clear log filter"},ka=function(){alert(G.toString(
))},P=function(){var a=0;K("dumping zones:");e.zone.eachZone(function(b){K(b.toS
tring());a++;return!0});
var b=a+" zones found";K(b);return b},A=function(){e.zone.clearZones();return"al
l zones deleted"},jc=function(){e.zone.parseZones();P();return"parsed zones"},kc
=function(){alert(r.version)};e.events.listen(e.events.eventType.instrumentation
Loaded,function(){n&&(n.addOper("log - toggle enabled",X),n.addOper("script - sh
ow params",ka),n.addOper("zones - dump",P),n.addOper("zones - clear",A),n.addOpe
r("zones - parse",jc),n.addOper("script - show version",kc),n.addOper("log - set
filter",ic))});var sa=
{},aa=r.core,ta,Ia,Ba={},lc=function(a){return!a||!(1<=a.length&&2>=a.length)?"a
rguments: el id [string]; zone id [string]*":$a({domElement:document.getElementB
yId(a[0]),id:a[1]||a[0]})},mc=function(a){return!a||1!=a.length?"arguments: el i
d [string];":ab({id:a[0]})},nc=function(a){return!a||!(1<=a.length&&2>=a.length)
?"arguments: el id [string]; categories list [string]*":bb({id:a[0],categories:a
[1]||""})};aa.events.listen(aa.events.eventType.instrumentationLoaded,function()
{ta&&(ta.addOper("zone - create",
lc),ta.addOper("zone - delete",mc),ta.addOper("zone - categories hint",nc))});va
r $a=function(a){var b=a.domElement,a=a.id;if(null==b)return sa.log("createAdZon
e: DOM element is null"),!1;var c=a+"";return null==a||""==a||""==(c=aa.util.tri
m(c))?(sa.log("createAdZone: ID is null or empty"),!1):aa.zone.createZone(c,b)},
ab=function(a){a=a.id;return null==a?!1:aa.zone.deleteZone(a)},bb=function(a){va
r b=a.id,a=a.categories,c;if(null==b)return!1;c=aa.zone.getZone(b);return null!=
c?(c.setCategories(b,
a.split(",")),!0):!1};Ba.setLocationHint=function(a){var b=a.currentLocationHref
,a=a.currentLocationHint;null!=b&&(Ia.currentLocationHref=b);null!=a&&(Ia.curren
tLocationHint=a);return!0};Ba.Zones={create:function(a){return $a(a)},del:functi
on(a){return ab(a)},setHint:function(a){return bb(a)}};Ba.Events={bind:function(
a,b,c){aa.util.bindEvent(a,b,c)}};sa.init=function(){ta=r.instrumentation;Ia=r.a
nalyticszones;sa.log("init api")};aa.register("api",sa,{});aa.extendAPI(Ba);var
U={},t=r.core,ua,cb,db,
Ja,eb,fb,gb,va,hb,ib,jb,Ka,E=function(a){U.log(a)},Q,kb=function(a,b,c){E("Ortc:
message received on channel '"+b+"':'"+c+"'");L&&L("messageReceived",JSON.parse
(c))},mb=function(a,b,c){b=b||lb;if(!la&&Ka)return E("Ortc: not connected. buffe
ring message to resend: "+a),wa.push(a),L&&L("messageSent",{message:a,channel:b,
sent:0}),!1;F&&(F.send(b,a.toString()),L&&(c=c||{},L("messageSent",{message:a,ch
annel:b,sent:c.sent||1})));return!0},nb=function(){if(0==wa.length)E("Ortc: no b
uffered messages to resend");
else{E("Ortc: resending buffered messages");for(var a,b=0;la&&0<(a=wa.splice(0,1
)).length;)mb(a[0],ca.outputChannel,{sent:2}),b++;E("Ortc: resent "+b+" message(

s)")}},oc=function(){la=!0;E("Ortc: connected");for(var a=La.length,b=0;b<a;b++)


ob(La[b],kb);F.setConnectionMetadata(Ma(++Na));Ka&&nb();"function"===typeof L&&L
("connected",+new Date)},ob=function(a,b){F.subscribe(a,!0,b);E("Ortc: subscribi
ng to channel:'"+a+"'")},pc=function(){la=!1;E("Ortc: disconnected");"function"=
==typeof L&&L("disconnected",
+new Date)},qc=function(a,b){E("Ortc: subscribed to channel:'"+b+"'")},rc=functi
on(a){E("Ortc: unsubscribed from channel:'"+a.channel+"'")},sc=function(a,b){E("
Ortc: exception:'"+b+"'")},pb=function(){E("Ortc: reconnected");F.setConnectionM
etadata(Ma(++Na));la=!0;nb();L&&L("reconnected",+new Date)},qb=function(){la=!1;
E("Ortc: reconnecting");L&&L("reconnecting",+new Date)},la,F,ca,L,wa=[],La,lb,Na
=0,Oa,Pa,Ma=function(a){if("function"!=typeof L)return null;a=L("getConnMetadata
",{connectionId:a}).toString();
E("Ortc: connection metadata: "+a);return a};Q={init:function(a){ca=a;var b=ca.i
sCluster,c=ca.serverUrl;Oa=ca.authToken;Pa=ca.appKey;La=ca.inputChannel;lb=ca.ou
tputChannel;var h=Ma(Na);loadOrtcFactory(IbtRealTimeSJType,function(a,d){if(null
!=d)return E("Ortc: error connecting to ORTC"),!1;null!=a&&(F=a.createClient(),n
ull!=h&&F.setConnectionMetadata(h),F.setId("client"),F.setConnectionTimeout(1E3)
,E("Ortc: connection timeout: 1000"),b?F.setClusterUrl(c):F.setUrl(c),F.onConnec
ted=oc,F.onSubscribed=
qc,F.onUnsubscribed=rc,F.onException=sc,F.onDisconnected=pc,F.onReconnecting=qb,
F.onReconnected=pb,F.connect(Pa,Oa))});return!0},setup:function(a){L=a.listener}
,send:mb,subscribe:function(a){if(a)for(var a="[object Array]"!==Object.prototyp
e.toString.call(a)?[a]:a,b=0;b<a.length;b++)ob(a[b],kb)},reconnecting:qb,reconne
cted:pb,dumpBuffer:function(){for(var a=0,b=wa.length;a<b;a++)E(wa[a]);E(b+" mes
sage(s) buffered")},connect:function(){F.connect(Pa,Oa)},disconnect:function(){F
.disconnect()},isConnected:function(){return F&&
F.getIsConnected()},existsOrtcClient:function(){return null!=F}};var rb=new func
tion(a){var b=[],c=function(b){a.log("channelSubscriptionHelper: "+b)},h=functio
n(a){c("enqueuing "+JSON.stringify(a));b.push(a)};this.subscribe=function(a){Q.i
sConnected()?Q.subscribe(a):h({type:"s",ch:a})};this.unsubscribe=function(a){Q.i
sConnected()?Q.subscribe(a):h({type:"u",ch:a})};t.events.listen(t.events.eventTy
pe.ortcConnected,function(){var a,h,d;if(0==(h=a=b.length))c("queue empty");else
{for(;a--;)d=b.shift(),
"s"==d.type?Q.subscribe(d.ch):"u"==d.type&&Q.unsubscribe(d.ch);c("Finished proce
ssing queue with size "+h)}})}(U),tc=function(){Q.disconnect();return"ORTC disco
nnect..."},uc=function(){Q.connect();return"ORTC connect..."},vc=function(){retu
rn"ORTC "+(Q.isConnected()?"":"not")+" connected"};t.events.listen(t.events.even
tType.instrumentationLoaded,function(){ua&&(ua.addOper("ortc - disconnect",tc),u
a.addOper("ortc - connect",uc),ua.addOper("ortc - isConnected",vc))});db=t.getPa
ram("crt","connectOrtcOn",
!0,!0);Ja=t.getParam("uos","urlOrtcServer","");eb=t.getParam("oic","ortcIsCluste
r",!0,!0);va=t.getParam("cip","channelInPrefix","");hb=t.getParam("cop","channel
OutPrefix","");ib=t.getParam("aut","authToken","");Ka=t.getParam("rmo","resendMe
ssagesOn",!0,!0);jb=t.getParam("apk","appKey","");var sb=t.globalParameters.publ
isherChannelId=t.getParam("cid","publisherChannelId","");fb=va+sb;gb=hb+sb;U.sen
dMessage=function(a,b){Q.send(a,b)};U.subscribeChannel=function(a){for(var a=t.u
til.isArray(a)?a:[a],
b=a.length;b--;)rb.subscribe(va+a[b])};U.unsubscribeChannel=function(a){for(var
a=t.util.isArray(a)?a:[a],b=a.length;b--;)rb.unsubscribe(va+a[b])};U.init=functi
on(){ua=r.instrumentation;cb=r.messaging;var a={connected:function(a){E("Ortc li
stener: ortc connected");t.events.emit(t.events.eventType.ortcConnected,a)},reco
nnected:function(a){E("Ortc listener: reconnected");t.events.emit(t.events.event
Type.ortcConnected,a)},reconnecting:function(a){E("Ortc listener: reconnecting")
;t.events.emit(t.events.eventType.ortcDisconnected,
a)},disconnected:function(a){E("Ortc listener: disconnected");t.events.emit(t.ev
ents.eventType.ortcDisconnected,a)},messageReceived:function(a){E("Ortc listener
: messageReceived");E("message received: "+JSON.stringify(a));t.events.emit(t.ev
ents.eventType.messageReceived,a)},messageSent:function(a){U.log("message sent:
"+a.message);t.events.emit(t.events.eventType.messageSent,a)},getConnMetadata:t.
extension.make("ortc.metadata",function(a){var c=cb.Message.create();c.addAction

("cd");c.add(a.connectionId);
c.addDebug(r.version||"0.0.0");return c})};V=function(b,c){return a[b](c)};Q.set
up({listener:V});db&&(E("connecting to ORTC on url:'"+Ja+"'"),t.util.executeOnPr
edicate(function(){t.util.raiseEvent(t.util.scriptEvents.connectionStatusChanged
,{action:"connecting"});var a=[];a.push(fb);a.push(va+t.globalParameters.session
Id);Q.init({websiteId:t.globalParameters.websiteId,contextId:t.globalParameters.
contextId,sessionId:t.globalParameters.sessionId,serverUrl:Ja,isCluster:eb,input
Channel:a,outputChannel:gb,
authToken:ib,appKey:jb})},function(){return!!window.loadOrtcFactory}));U.log("in
it ortc")};t.register("ortc",U,{ortcConnected:function(a){U.log("onOrtcConnected
: "+a);t.util.raiseEvent(t.util.scriptEvents.connectionStatusChanged,{action:"co
nnected"})},ortcDisconnected:function(a){U.log("onOrtcDisconnected: "+a);t.util.
raiseEvent(t.util.scriptEvents.connectionStatusChanged,{action:"disconnected"})}
});var M={},O=r.core,ba,Ca,wc=O.globalParameters.msgVersion,tb,da,fa=new functio
n(){var a=function(a){var c,
h,g=[],d=[];this.add=function(a,b){b&&(a=encodeURIComponent(a));g.push(a)};this.
addAction=function(a){g[1]=a};this.field=function(a){var b="";switch(a){case "ac
tion":b=g[1];break;default:b=null}return b};this.addId=function(a){g[FIELD_ID]=a
};this.addDebug=function(a,b){d.push(b?encodeURIComponent(a):a)};this.toString=f
unction(){var a=g;1<d.length&&(a=a.concat(d));return a.join(c)};this.fieldSepara
tor="|";c=a.sep;h=a.debugPrefix;g[0]=a.version;g[1]=a.action;g[2]=a.websiteId;g[
3]=a.sessionId;g[4]=a.contextId;
d.push(h)};this.create=function(b){var b=b||{},c={sep:"|",debugPrefix:"!!DBG:",i
d:"",action:""};c.version=wc;c.websiteId=b.websiteId||O.globalParameters.website
Id;c.sessionId=O.globalParameters.sessionId;c.contextId=O.globalParameters.conte
xtId;return new a(c)}},ma=function(a){return"undefined"==typeof a||null==a?!1:!0
};M.sendMessage=function(a){if(ba)for(var a=O.util.isArray(a)?a:[a],b=0,c=a.leng
th;b<c;b++)ba.sendMessage(a[b])};M.sendViewportState=function(a){if(ba&&ma(a.ts)
&&ma(a.flag)){var b=fa.create();
b.addAction("su");b.add(a.ts);b.add(a.zoneIds);b.add(a.bannerIds);b.add(a.campai
gnIds);b.add(a.flag);M.sendMessage(b)}};M.sendPostInitState=function(a){if(ba&&m
a(a.ts)){var b=fa.create();b.addAction("pi");b.add(""+ +new Date);b.add(a.data);
M.sendMessage(b)}};M.sendImpressionNotification=function(a){if(ba&&ma(a.bannerId
)&&ma(a.zoneId)){var b=fa.create();b.addAction("bit");b.add(a.bannerId);b.add(a.
zoneId);b.add(a.campaignId||"");M.sendMessage(b)}};M.sendGtsNotification=functio
n(a){if(ba){var b=fa.create();
b.addAction(a.action);b.add(a.zoneId);b.add(a.bannerId);b.add(a.campaignId||"");
M.sendMessage(b)}};M.sendTrackingZones=function(a){if(ba&&ma(a.trackingzoneIds))
{var b=fa.create();b.addAction("wstz");b.add(a.trackingzoneIds);b.add(a.timestam
p);b.add(a.screenWidth);b.add(a.currentLocationHint);b.add(a.focus);M.sendMessag
e(b)}};M.sendChangeBannerRequest=function(a){if(ba){var b=fa.create(a);b.addActi
on("cbreq");b.add(a.pid);b.add("undefined"!=typeof a.bannerId?a.bannerId:"");b.a
dd("undefined"!=typeof a.script?
a.script:"");b.add("undefined"!=typeof a.mode?a.mode:"");b.add("undefined"!=type
of a.meta?a.meta:"");b.add("undefined"!=typeof a.state?a.state:"");a.testdata&&b
.add(JSON.stringify(a.testdata));M.sendMessage(b)}};M.Message=fa;M.init=function
(){O=r.core;ba=r.ortc;Ca=r.instrumentation;(tb=O.getParam("plo","pageLoggerOn",!
1,!0))&&O.util.executeOnPredicate(function(){ub(!0)},function(){return document.
body});M.log("init messaging")};var xc=function(a){var b,c,h,g=1,d=[];this.setOp
acity=function(a){b.style.opacity=
a};this.setBgColor=function(a){b.style.backgroundColor=a};this.setHeight=functio
n(a){b.style.height=a+"px"};this.setFontSize=function(a){h=a};this.show=function
(){b.style.display="";c=!0};this.hide=function(){b.style.display="none";c=!1};th
is.toggle=function(){c?this.hide():this.show();return c};this.clear=function(){b
.innerHTML=""};this.addLineDecorator=function(a,b){d.push([RegExp(a,"g"),b])};th
is.write=function(a){if(c){var e=document.createElement("div");e.setAttribute("s
tyle","text-align:left;z-index:2147483640;font-weight:bold;color:#ff0000;opacity
:1.0;font-size:"+
h+"px");for(var p='<span style="color:#0000ff">'+("000"+g++).slice(-3)+"</span>
",q=d.length,m=0;m<q;m++)a=a.replace(d[m][0],d[m][1]);e.innerHTML=p+a;0===b.chil

dNodes.length?b.appendChild(e):b.insertBefore(e,b.childNodes.item(0));setTimeout
(function(){e.style.color="#000000"},2E3)}};a=a||{};h=a.fontSize||11;a=a.height|
|100;b=document.createElement("div");b.setAttribute("style","line-height: 13px;p
adding:5px;position: fixed;bottom:0;width: 99%;border: 0px solid black;height:"+
a+"px;background-color:yellow;overflow:auto;opacity:0.8;z-index:2147483640");
b.setAttribute("id","page-logger");document.body&&document.body.appendChild(b);t
his.hide()},yc=function(a){da&&da.write((0==a.sent?"!":2==a.sent?"*":"")+"["+O.u
til.ts()+"] "+a.message)},ub=function(a){O.events.listen(O.events.eventType.mess
ageSent,yc);da=new xc({height:150});a&&da.show()},zc=function(){!da&&ub();da.tog
gle()},Ac=function(){tb&&da&&da.clear()};O.events.listen(O.events.eventType.inst
rumentationLoaded,function(){Ca&&(Ca.addOper("page log - toggle enabled",zc),Ca.
addOper("page log - clear",
Ac))});O.register("messaging",M,{});var s={},f=r.core,Qa,na,ga,ha=!1,vb,wb,Ra,xb
,Da,yb,Sa,oa,zb,xa,Ab,Bb,Ta,Bc=function(){ga=!ga;return"focus "+(ga?"on":"off")}
,Cc=function(){ha=!ha;f.zone.eachZone(function(a){ha?Cb({zone:a,inspection:{top:
a.top,left:a.left,width:a.width,height:a.height,verticalVisible:0,horizontalVisi
ble:0,visibleArea:0}}):null!=a.overlay&&(a.overlay.del(),delete a.overlay);retur
n!0});return"zones overlay "+(ha?"on":"off")},Dc=function(a){return!a||1!=a.leng
th?"arguments: threshold secs [int]":
"visibility threshold: "+parseInt(a[0],10)+" ms"},Ec=function(a){if(!a||1!=a.len
gth)return"arguments: threshold % [int]";Ra=a=parseInt(a[0],10);return"visibilit
y threshold: "+a+" ms"},Fc=function(a){var b=a.color||"#ff0000",c=a.opacity||0.7
,h=a.id,g;this.setText=function(a){g.innerHTML="<div id='overlay_"+h+"' style='f
ont-size:14px;text-align:center;opacity:1;z-index:9000'><b>"+a+"</b></div>"};thi
s.hide=function(){g.setAttribute("style","display:none")};this.del=function(){g&
&g.parentNode.removeChild(g)};
this.setVolatileColor=function(a){g.style.backgroundColor=a};this.show=function(
a){g.setAttribute("id","overlay_shell_"+h);g.setAttribute("style","display:'';bo
rder:0px solid;background-color:"+b+"; position:absolute;top:"+a.data.top+"px;le
ft:"+a.data.left+"px;height:"+a.data.height+"px;width:"+a.data.width+"px;z-index
:10000000;opacity:"+c);a.text&&this.setText(a.text)};g=document.createElement("d
iv");document.body&&document.body.appendChild(g)},Cb=function(a){var b=a.zone;ha
&&(null==b.overlay&&(b.overlay=
new Fc({id:b.id,data:a.inspection,opacity:0.5})),b.overlay.show({data:a.inspecti
on,text:"<b>pid:"+b.id+"</b>"}))},Gc=function(a){Cb(a)};f.events.listen(f.events
.eventType.instrumentationLoaded,function(){na&&(na.addOper("zones - toggle over
lay",Cc),na.addOper("focus - toggle enabled",Bc),na.addOper("zones - change visi
bility threshold",Dc),na.addOper("zones - change banner's area threshold",Ec),f.
events.listen(f.events.eventType.zoneInTentative,Gc))});var Eb=function(a){var a
=a||{},b=a.timeStamp||
a.event?a.event.timeStamp||+new Date:+new Date,c={height:xb,minAreaVisible:Ra,to
p:a.top,left:a.left,id:this.id};this.wsOwner&&(c.width=this.width,c.height=this.
height,c.useDimensions=!0);c=Db(this.element,c);a.reset&&(c.inViewport=!1);"unde
fined"!=typeof a.forceInViewport&&(c.inViewport=a.forceInViewport);this.left=c.l
eft;this.top=c.top;this.width=c.width;this.height=c.height;var h=this.currView;t
his.currView=c.inViewport;a={inspectData:c,timeStamp:b,reset:a.reset};this.currV
iew&&!h?this.intoView(a):
!this.currView&&h&&this.outOfView(a);this.log((this.currView?"ON":"OFF")+" VIEW
| (zone) t:"+this.top+" l:"+this.left+" w:"+this.width+" h:"+this.height+(c.defa
ultHeight?"*":"")+" a:"+c.visibleArea+"% | (viewport): t:"+c.viewportTop+" r:"+c
.viewportRight+" b:"+c.viewportBottom+" l:"+c.viewportLeft+" w:"+c.viewportWidth
+" h:"+c.viewportHeight)},Db=function(a,b){var c,h,g,d,e,x,p,q,m,ia,ja,ya=0,j=0,
n,r,t=b.minAreaVisible||100;p=f.util.viewport.scrollLeft();x=f.util.viewport.scr
ollTop();q=f.util.viewport.height();
m=f.util.viewport.width();r="undefined"!==typeof a.style&&("none"==a.style.displ
ay||"hidden"==a.style.visibility);if("undefined"!==typeof b.top&&"undefined"!==t
ypeof b.left)c=b.top,h=b.left;else if(c=a.offsetTop,h=a.offsetLeft,a.style.posit
ion&&"fixed"==a.style.position)c+=x,h+=p;else{for(g=a;g.offsetParent;){g=g.offse
tParent;if(g.style.position&&"fixed"==g.style.position){c+=x;h+=p;break}c+=g.off
setTop;h+=g.offsetLeft}for(g=a;g.parentNode&&!(g=g.parentNode,r=r?r:"undefined"!

==typeof g.style&&("none"==
g.style.display||"hidden"==g.style.visibility),g.style&&"fixed"==g.style.positio
n););}b.useDimensions?(g=parseInt(b.width),d=parseInt(b.height)):(g=f.util.DOM.g
etElementWidth(a),d=f.util.DOM.getElementHeight(a),!d&&b.height&&(d=b.height,e=!
0));ia=p+m;ja=x+q;c>=x&&c+d<=ja&&h>=p&&h+g<=ia?n=100:c+d<x||c>ja||h+g<p||h>ia?n=
0:(c>=x&&c+d<=ja?ya=d:c<x?ya=c+d-x:c<ja&&(ya=ja-c),h>=p&&h+g<=ia?j=g:h<p?j=h+g-p
:h<ia&&(j=ia-h),n=Math.round(100*(ya*j/(d*g))));return{top:c,left:h,width:g,heig
ht:d,defaultHeight:e,
viewportTop:x,viewportRight:ia,viewportBottom:ja,viewportLeft:p,viewportWidth:m,
viewportHeight:q,verticalVisible:ya,horizontalVisible:j,visibleArea:n,inViewport
:r?!1:n>=t?!0:!1}},Gb=new function(){var a=new function(){var a,c,h,d;this.zones
=function(){return a};this.banners=function(){return c};this.campaigns=function(
){return h};this.equals=function(a,b,c,h){return d==e(a,b,c,h)};this.update=func
tion(l,x,p,q){a=x;c=p;h=q;d=e(l);s.log("update viewstate to: "+d)};var e=functio
n(d,g,e,q){return"z:"+
(g||a.join())+"|b:"+(e||c.join())+"|c:"+(q||h.join())+"|f:"+d}};this.reset=funct
ion(){clearTimeout(Sa);Da=0};this.sendStatus=function(b){if(wb){var b=b||{},c,d=
[],g=[],e=[],l=!!b.ignoreViewport,x=oa?1:0;if(zb||!l){var p=f.zone.zones(),q;for
(q in p)c=p[q],!xa&&Eb.call(c,b),d.push(c.currView?c.id||"":""),g.push(c.currVie
w?!Ta&&c.remnant?"":c.bannerId||"":""),e.push(!Ta&&c.remnant?"":c.campaignId||""
)}if(l||!a.equals(x,d,g,e))clearTimeout(Sa),l||(a.update(x,d,g,e),s.log("viewpor
tStateHelper: viewport changed: zones ("+
d.length+"): "+d.join()+" banners ("+g.length+"): "+g.join())),Qa&&Qa.sendViewpo
rtState({ts:b.ts?b.ts:+new Date,zoneIds:a.zones(),bannerIds:a.banners(),campaign
Ids:a.campaigns(),flag:x}),Da&&(Sa=setTimeout(Fb,Da))}}},Y=Gb.sendStatus,Fb=func
tion(){Y({ignoreViewport:!0})},Hc=function(a){Y({event:a})},Ic=function(a){oa&&Y
({event:a})},Hb=function(a){if(ga||!a)s.log((ga?"":"!")+"focus"),oa=!0,Y({event:
a}),f.util.raiseEvent(f.util.scriptEvents.focusStatusChanged,{action:"focusin"})
},Ib=function(a){ga&&
(s.log("blur"),oa=!1,Y({event:a,reset:!0}),f.util.raiseEvent(f.util.scriptEvents
.focusStatusChanged,{action:"focusout"}))},Z=function(a){return RegExp(a+"=(?:'|
\")([^('|\")]*)(?:'|\")")},Ua=function(a,b,c){var d=null,a=a.match(b);null!=a&&c
<a.length&&(d=a[c]);return d},Jb,Jc=Z(f.globalParameters.attFirstPrint);Jb=funct
ion(a){var b=a.element.innerHTML;s.log("trackFirstPrint: parsing first print on
zone:"+a.id+" using attrib '"+f.globalParameters.attFirstPrint+"':"+b);"1"!=Ua(b
,Jc,1)?s.log("trackFirstPrint: no first impressions to process in zone: "+
a.id):(s.parseZoneData(a,b),f.events.emit(f.events.eventType.bannerPrint,a),s.lo
g("trackFirstPrint: updated zone on first print:"+a))};var Kb={bannerId:Z(f.glob
alParameters.attBannerId),campaignId:Z(f.globalParameters.attCampaignId),display
Time:Z(f.globalParameters.attDisplayTime),impressionId:Z(f.globalParameters.attI
mpressionId),remnant:Z(f.globalParameters.attRemnant),contentUrl:Z(f.globalParam
eters.attContentUrl),gtsTrackerUrl:Z(f.globalParameters.attTracker),close:Z(f.gl
obalParameters.attClose)},
Lb={remnant:function(a){return"1"!=a?!1:!0}};s.parseZoneData=function(a,b,c){var
c=c||{},d,g={},e={},l=c.map,c=c.tokens;for(d in Kb)g[d]=Kb[d];for(d in c)g[d]=c
[d];for(d in Lb)e[d]=Lb[d];for(d in l)e[d]=l[d];for(var x in g)if(d=Ua(b,g[x],1)
)a[x]=e[x]?e[x](d):d,s.log("parseZoneData: updated "+x+":"+a[x])};s.ready=functi
on(){if(xa){var a,b=f.getParam("tps","trackingPixelStyle","{}"),b=JSON.parse(b),
c={width:"1px",height:"1px",position:"fixed",top:"0px",left:"0px","z-index":"999
99",display:"block",padding:"0px",
margin:"0px"};for(a in b)c[a]=b[a];var d="";for(a in c)d+=a+":"+c[a]+";";a=funct
ion(a){var b='<object id="wsTrackingPixel'+a+'" classid="clsid:d27cdb6e-ae6d-11c
f-96b8-444553540000" align="middle" style="'+d+'">\n
<param name="mov
ie" value="http://s3.amazonaws.com/webspectator-images/ws-throttle.swf" />\n
<param name="flashVars" value="idZone='+a+'" />\n
<param name
="quality" value="high" />\n
<param name="hasPriority" value="true" /
>\n
<param name="play" value="true" />\n
<param name="loop
" value="true" />\n
<param name="wmode" value="window" />\n
<param name="scale" value="showall" />\n
<param name="menu" value="
true" />\n
<param name="devicefont" value="false" />\n
<pa

ram name="salign" value="" />\n


<param name="allowScriptAccess" value
="always" />\n
<\!--[if !IE]>--\>\n
<object id="wsTracking
Pixel'+
a+'" data="http://s3.amazonaws.com/webspectator-images/ws-throttle.swf" style="w
idth: 1px; height: 1px; position: fixed; top: 0px; left: 0px; z-index: 99999;"
type="application/x-shockwave-flash">\n
<param name="movie" valu
e="http://s3.amazonaws.com/webspectator-images/ws-throttle.swf" />\n
<param name="flashVars" value="idZone='+a+'" />\n
<param name
="quality" value="high" />\n
<param name="hasPriority" value="tru
e" />\n
<param name="play" value="true" />\n
<para
m name="wmode" value="window" />\n
<param name="loop" value="true
" />\n
<param name="scale" value="showall" />\n
<p
aram name="menu" value="true" />\n
<param name="devicefont" value
="false" />\n
<param name="salign" value="" />\n
<
param name="allowScriptAccess" value="always" />\n
<\!--<![endif]
--\>\n
<\!--[if !IE]>--\>\n
</object>\n
<\!
--<![endif]--\>\n
</object>';
if(!document.getElementById("wsTrackingPixel"+a)){var c=document.createElement("
DIV");c.innerHTML=b;document.body.appendChild(c.firstChild);s.log("created flash
to track zone: "+a)}};var g,b=f.zone.zones(),e;for(e in b){a((g=b[e]).id);break
}var l=g,x;window.__wsZoneInView=function(a,b){s.log("[__wsZoneInView] zone:"+a+
" "+("true"==b?"in":"off")+" view");if(a!=l.id)s.log("[__wsZoneInView] zoneid: "
+a+" does not match with tracking zone: "+l.toString());else if(b!=x){x=b;var b=
"true"==b,c={timeStamp:+new Date};
(oa=l.currView=b)?l.intoView(c):l.outOfView(c);Y();s.log("[__wsZoneInView] zone
changed to "+(b?"in":"off")+" view: "+l.toString())}}}s.log("ready tracking")};s
.isFocused=function(){return oa};s.init=function(){f=r.core;Qa=r.messaging;na=r.
instrumentation;yb?Hb():Ib();if(Bb&&(window.MutationObserver||window.WebKitMutat
ionObserver||window.MozMutationObserver))(new (window.MutationObserver||window.W
ebKitMutationObserver||window.MozMutationObserver)(function(){Y({})})).observe(d
ocument,{attributes:!0,
childList:!0,subtree:!0});s.log("init tracking")};s.reset=function(){Gb.reset()}
;xb=f.getParam("dbh","defaultBannerHeight",155);ga=f.getParam("fcs","focusOn",!0
,!0);Ra=f.getParam("bat","bannerAreaThreshold",50);f.getParam("bvt","bannerVisib
ilityThresholdMs",500);Da=parseInt(f.getParam("psi","pingStateIntervalMs",1E4));
wb=f.getParam("sso","sendStatusOn",!0,!0);vb=f.getParam("tfo","trackFirstPrintOn
",!1,!0);yb=f.getParam("ifo","initFocusOn",!0,!0);f.globalParameters.scriptInFra
meOn=xa=f.getParam("sfo",
"scriptInFrameOn",!1,!0);zb=f.getParam("fcv","forceCheckViewport",!1,!0);Bb=f.ge
tParam("tdc","trackDomChanges",!1,!0);Ab=f.getParam("tze","trackZonesElement",!1
,!0);Ta=f.getParam("trc","trackRemnantCampaigns",!0,!0);f.events.listen(f.events
.eventType.zoneIn,function(a){s.log("zone in view: "+a);ha&&a.overlay&&a.overlay
.setVolatileColor("#00ff00")});f.events.listen(f.events.eventType.zoneOut,functi
on(a){a=a.zone;s.log("zone out view: "+a.toString());ha&&a.overlay&&a.overlay.hi
de();f.util.raiseEvent(f.util.scriptEvents.zoneStatusChanged,
{action:"inactive",zone:a})});f.events.listen(f.events.eventType.zoneInTentative
,function(a){f.util.raiseEvent(f.util.scriptEvents.zoneStatusChanged,{action:"ac
tive",zone:a.zone})});xa||(f.events.listen(f.events.eventType.scroll,Hc),f.event
s.listen(f.events.eventType.resize,Ic),f.events.listen(f.events.eventType.focus,
Hb),f.events.listen(f.events.eventType.blur,Ib));var I=f.zone.getPrototype();I.v
isibleThresholdHnd=null;I.currView=!1;I.enteredView=!1;I.left=-1;I.top=-1;I.widt
h=0;I.height=0;I.visibleTime=
0;I.displayTime=0;I.overlay=null;I.zoneInViewMessage=null;I.zoneTimer=null;I.cam
paignId=0;I.impressionId=0;I.remnant=!1;I.setVisibleTime=function(a){return this
.visibleTime+=a};I.intoView=f.extension.make("tracking.intoview",function(a){thi
s.zoneTimer.start(a.timeStamp);this.enteredView=!0;f.events.emit(f.events.eventT
ype.zoneInTentative,{zone:this,inspection:a.inspectData})});I.outOfView=f.extens
ion.make("tracking.outofview",function(a){var b=this.zoneTimer.stop(a.timeStamp)
,c=this.enteredView;this.enteredView=
!1;f.events.emit(f.events.eventType.zoneOut,{zone:this,inspection:a.inspectData,

inTentativeView:c,visibleTime:b,timeStamp:a.timeStamp})});f.extension.add("core.
zone.init",function(){var a=this;this.visibleTime=0;this.zoneTimer=new f.util.Pa
rtialTimer;this.viewportChanged=function(b){Eb.call(a,b)};this.log("initTracking
")});f.extension.add("core.zone.start",function(){var a={};f.util.raiseEvent(f.u
til.scriptEvents.zoneStatusChanged,{action:"inactive",zone:this});vb&&Jb(this);a
.InitializeInView&&(this.log("force viewport in"),
a.forceInViewport=!0);!xa&&Y(a);this.log("startTracking")});f.extension.add("cor
e.zone.getdata",function(a){a.metrics={top:this.top,left:this.left,width:this.wi
dth,height:this.height};return a});f.extension.add("core.zone.del",function(){va
r a=+new Date;if(this.currView){var b=this.zoneTimer.stop(a);f.events.emit(f.eve
nts.eventType.zoneOut,{zone:this,inTentativeView:this.enteredView,visibleTime:b,
timeStamp:a});Y()}clearInterval(this.visibleThresholdHnd);f.events.unlisten(f.ev
ents.eventType.viewportChanged,
this.viewportChanged);this.overlay&&this.overlay.del();this.log("delTracking")})
;f.extension.add("core.zone.tostring",function(a,b){b.currView=a.currView;b.ente
redView=a.enteredView;b.left=a.left;b.top=a.top;b.width=a.width;b.height=a.heigh
t;b.visibleTime=a.visibleTime;b.displayTime=a.displayTime;b.campaignId=a.campaig
nId;b.impressionId=a.impressionId;b.remnant=a.remnant;b.zoneTimer=JSON.stringify
(a.zoneTimer.toJSON());return b});f.extension.make("tracking.upgradeFromTentativ
eView",function(a){s.log("upgradeFromTentativeView: "+
a);a.enteredView&&(a.enteredView=!1,f.events.emit(f.events.eventType.zoneIn,a))}
);f.extension.make("tracking.inTentativeView",function(a){return a.enteredView})
;s.sendViewportState=Y;s.sendLastViewportState=Fb;s.buildRegex=Z;s.matchRegex=Ua
;s.inspectElement=Db;r.core.register("tracking",s,{});Ab&&r.core.util.executeOnP
redicate(function(){var a="div."+r.core.globalParameters.zoneClassName;s.log("mu
tation observer on with selector: '"+a+"'");new MutationSummary({callback:functi
on(a){var c=a[0];if(c.attributeChanged){a=
c.attributeChanged;s.log("mutation: attributes changed: ");for(var d in a)s.log(
"mutation: attr '"+d+"' in elements:"),a[d].forEach(function(a){s.log("data-pid:
"+a.getAttribute("data-pid")+"| old value:'"+c.getOldAttribute(a,d)+"'| new val
ue:'"+a.getAttribute(d)+"'")})}},queries:[{element:a,elementAttributes:"style"}]
})},function(){return"undefined"!=typeof window.MutationSummary});var B={},d=r.c
ore,J,S,y,za,Mb,Nb,Ob,Pb,Va,Qb,Rb,Sb,Ea,Tb,Kc=function(a){if(!a||!(1<=a.length&&
6>=a.length))return"arguments: zone ID [string]; display time secs [int=5]*; ban
ner ID [string list]*; change mode [string=p|n|l]*; use changebanner message [in
t:0|1]";
var b=a[0],c=a[1]||5,h=a[2],g=a[3]||"r",e=a[5]&&("1"===a[5]?!0:!1);a[4]&&"1"===a
[4]?Fa({a:"cb",v:"1.6",d:{z:b,b:h,u:c,c:"666",m:g,content:e?'document.write(\'<d
iv style="width:0px;height:0px" data-iid="f84159fc75413f40" data-bid="299" datapid="454" data-cpid="49" data-dt="20000" data-fp="1" data-bannerWidth="300" data
-bannerHeight="250" ></div>\');document.write(\'<s\' + \'cript type=\\"text/java
s\' + \'cript\\" >var urlPing=\\"http://services.webspectator.com/logPrint/49/29
9/\\" + +new Date;document.write(\\"<s\' + \'cript type=\\\\\\"text/javas\' + \'
cript\\\\\\" src=\\\\\\"\\" + urlPing + \\"\\\\\\"><\\\\/s\' + \'cript>\\");<\\/
s\' + \'cript><s\' + \'cript src=\\"http://bs.serving-sys.com/BurstingPipe/adSer
ver.bs?cn=rsb&c=28&pli=5759213&PluID=0&w=300&h=250&ord=%%880518651%%&ucm=true&if
l=$$http://adserver.ig.com.br/RealMedia/ads/Creatives/OasDefault/hosting_hospeda
gem_300605/addineyeV2.html$$&ncu=$$http://services.webspectator.com/pc/30/299/45
4/e35571bc14cd6bf1?t=880518651&ckurl=http://adserver.ig.com.br/RealMedia/ads/cli
ck_lx.ads/%%PAGE%%/%%RAND%%/%%POS%%/%%CAMP%%/%%IMAGE%%/%%USER%%$$&z=99999\\"><\\
/s\' + \'cript><nos\' + \'cript><a href=\\"http://services.webspectator.com/pc/3
0/299/454/e35571bc14cd6bf1?t=880518651&ckurl=http://adserver.ig.com.br/RealMedia
/ads/click_lx.ads/%%PAGE%%/%%RAND%%/%%POS%%/%%CAMP%%/%%IMAGE%%/%%USER%%http%3A//
bs.serving-sys.com/BurstingPipe/adServer.bs%3Fcn%3Dbrd%26FlightID%3D5759213%26Pa
ge%3D%26PluID%3D0%26Pos%3D7334\\" target=\\"_blank\\"><img src=\\"http://bs.serv
ing-sys.com/BurstingPipe/adServer.bs?cn=bsr&FlightID=5759213&Page=&PluID=0&Pos=7
334\\" border=0 width=300 height=250><\\/a><\\/nos\' + \'cript>\');':
null}}):(a=d.zone.getZone(b),a.changeBanner({zoneId:a.id,displayTime:1E3*c,banne
rId:h,mode:g,forceEntryOptions:!0}))},Lc=function(a){if(!a||1>a.length)return"ar
guments: zone ID [string]";d.zone.getZone(a[0]).nextBanner()},Mc=function(a){if(

!a||1>a.length)return"arguments: zone id [string]";var a=a[0],b=d.zone.getZone(a


);if(null==b)throw"zone "+a+" not found!";b.autoUpdateOn=!b.autoUpdateOn;b.autoU
pdateOn&&Ub.start();a="zone "+a+" autoupdate "+(b.autoUpdateOn?"on":"off");B.log
(a);return a},Nc=function(a){if(!a||
1>a.length)return"arguments: zone id [string]";var a=a[0],b=d.zone.getZone(a);if
(null==b)throw"zone "+a+" not found!";b.autoUpdateQueueOn=!b.autoUpdateQueueOn;a
="zone "+a+" autoUpdateQueue "+(b.autoUpdateQueueOn?"on":"off");B.log(a);return
a},Oc=function(){d.zone.eachZone(function(a){a.autoUpdateOn=!a.autoUpdateOn;retu
rn!0});B.log("toggle autoupdate in all zones");return"toggle autoupdate in all z
ones"},Pc=function(a){if(!a||!(1<=a.length&&3>=a.length))return"arguments: zone
ID [string]; display time secs [int=5]; banner ID [string list]";
var b=a[0],c=a[2],a=a[1]||5,h=d.zone.getZone(b);h.addBanner({displayTime:1E3*a,b
annerId:c,zoneId:b,fetchBanner:!0});h.queue.dump();return"added banner to zone "
+b+" queue"},Qc=function(a){if(!a||1>a.length)return"arguments: zone ID [string]
;";a=a[0];d.zone.getZone(a).queue.dump();return"zone "+a+" queue dumped to log"}
,Rc=function(a){if(!a||1>a.length)return"arguments: zone ID [string];";var a=a[0
],b=d.zone.getZone(a);b.queue.clear();b.queue.dump();return"zone "+a+" queue cle
ared"},Sc=function(a){if(!a||
1>a.length)return"arguments: campaignID[,campaignID] [string];";var b=a[0].split
(",");d.zone.eachZone(function(a){for(var d=0;d<b.length;d++)a.decoratorStickyBa
nner&&a.decoratorStickyBanner.addCampaign(b[d])});return"sticky campaigns added"
},Tc=function(a){if(!a||1>a.length)return"arguments: zoneID; width; height";var
b={};b.zone=a[0];b.width=a[1]||300;b.height=a[2]||250;a=new Vb.overlayBanner(b,0
);d.zone.createZone(a.zone,a.contentDiv,{InitializeInView:!1});b=d.zone.getZone(
a.zone);b.nextBanner();
b.isOverlay=a};d.events.listen(d.events.eventType.instrumentationLoaded,function
(){S&&(S.addOper("zone - change banner",Kc),S.addOper("zone - next banner",Lc),S
.addOper("zone - toggle autoUpdate",Mc),S.addOper("zone - toggle autoUpdateQueue
",Nc),S.addOper("zones - toggle autoupdate",Oc),S.addOper("zone - add banner",Pc
),S.addOper("zone - dump queue",Qc),S.addOper("zone - clear queue",Rc),S.addOper
("zones - add sticky campaign",Sc),S.addOper("zones - add slider",Tc))});var Wb=
function(a,b){b.fetchingBanner=
!0;b.requestBeginTs=+new Date;var c=b.requestEndTs=0;(function g(d){c++;b.retrie
sHnd=setTimeout(function(){var d;J.sendChangeBannerRequest({websiteId:b.websiteI
d||null,pid:a.id,state:b.index+","+c,script:"undefined"!=typeof b.script?b.scrip
t:Tb,bannerId:b.bannerId});c<Va?(d=a.queue.get(b.index),d.fetchingBanner?(B.log(
"cbreq - send requesting (retry:"+c+")"),g(Qb)):B.log("cbreq - stop retries for
entry: "+d.toString())):B.log("cbreq - reached max retries: "+Va)},d)})(0)},Ga=n
ew function(){var a=[];
this.register=function(b,c){a[a.length]={cb:b,scope:c};return this};this.reset=f
unction(){a=[]};this.signal=function(){for(var b=a.length;b--;)"function"==typeo
f a[b].cb&&a[b].cb.apply(a[b].scope||null,Array.prototype.slice.call(arguments))
}},Xb,Uc=/"/g,Vc=/\n|\r/g,Wc=/<script/gi,Xc=/<\/script/gi;Xb=function(a){var b=d
ocument.createElement("script"),c="ws_cb_"+a.zone+"_"+ +new Date,d=a.contentUrl+
(-1!=a.contentUrl.indexOf("?")?"&":"?")+"callback="+c;B.log("fetching banner dat
a with src: '"+d+"'");
b.setAttribute("src",d);document.body.appendChild(b);window[c]=function(d){a.con
tent=a.content.replace('data-tracker=""','data-tracker="'+d.impressionUrl+'"');d
.flash&&(a.content+=d.flash);d=d.banner.replace(Uc,'\\"').replace(Vc,"").replace
(Wc,'<scr" + "ipt').replace(Xc,'</scr" + "ipt').replace("<\!--// <![CDATA[","").
replace("// ]]\> --\>","");a.content+='document.write("'+d+'")';a.ignoreContentU
rl=!0;Fa({a:"cbresp",d:a},!0);document.body.removeChild(b);delete window[c]}};va
r Fa=function(a,b){B.log("changeBanner with message: "+
JSON.stringify(a));var c,h,g,e,l,x,p=a.d;if(b)h={created:+new Date},h.zoneId=p.z
one,(c=d.zone.getZone(h.zoneId))?(x=d.util.trim(p.content||""),!x&&c.isOverlay?2
>c.isOverlay.retries&&(c.isOverlay.retries++,Ea?c.isOverlay.close():c.nextBanner
()):(y.parseZoneData(h,x),h.entryId=p.state.split(",")[0],h.html=x,h.close?!Ea&&
c.isOverlay?c.isOverlay.close():(B.log("hide banner content in zone: "+c.id),0<c
.element.childNodes.length&&(c.element.childNodes[parseInt(c.queue.getPrevious()
.node,10)].style.display=

"none")):(x&&c.isOverlay&&(c.isOverlay.retries=0),!p.ignoreContentUrl&&h.content
Url?(p.contentUrl=h.contentUrl,Xb(p)):c.bannerFetched(h)))):B.log("zone not foun
d in change banner: "+h.zoneId);else{h=p.z;g=p.b;e=p.c;l=p.i;x=p.content;var q=p
.u;if(c=d.zone.getZone(h)){if(!x&&(Sb&&(Yb.setGtsTracker(c,c.queue.getCurrent())
,setGtsTrackerInternal(c,c.queue.getCurrent())),c.isOverlay)){2>c.isOverlay.retr
ies&&(c.isOverlay.retries++,Ea?c.isOverlay.close():c.nextBanner());return}!c.cur
rView&&!c.isOverlay?B.log("change banner in off view zone not allowed: "+
h):(x&&(c.isOverlay&&(c.isOverlay.retries=0),x=x.replace("[WS-SESSIONID]",d.glob
alParameters.sessionId),"undefined"==typeof l&&(l=y.matchRegex(x,y.buildRegex("d
ata-iid"),1))),c.changeBanner({displayTime:1E3*q,bannerId:g,campaignId:e,impress
ionId:l,html:x,data:p,mode:p.m}))}else B.log("zone not found in change banner: "
+h)}},Yc=new function(a){var b,c={},h=function(){g()};this.init=function(){d.get
Param("cco","campaignChannelOn",!1,!0)&&(b=d.getParam("ccp","campaignChannelPref
ix",""),d.events.listen(d.events.eventType.bannerPrint,
h),g())};var g=function(){var g,h={},e;g=d.zone.zones();for(var p in g)e=g[p],e.
campaignId&&(h[e.campaignId]=!0);g=c;e={add:[],rem:[]};for(k in g)h[k]||e.rem.pu
sh(k);for(k in h)g[k]||e.add.push(k);g=JSON.stringify(e);a.log("campaignChannels
Mgr: "+g);if(0<(g=e.add.length))for(;g--;)za&&za.subscribeChannel(b+e.add[g]);if
(0<(g=e.rem.length))for(;g--;)za&&za.unsubscribeChannel(b+e.rem[g]);c=h}}(B),Ub=
new function(a){var b,c=function(b){a.log("bannersUpdateManager: "+b)};this.run=
function(a){var b;b=+new Date;
if((a.autoUpdateOn||a.autoUpdateQueueOn&&!a.queue.isQueueEmpty()||0<a.updateCoun
t)&&!a.throttlingBannerUpdate&&a.currView&&!a.processingBanner&&!a.isFetchingCur
rentBanner())b=a.calculateVisibleTime(b),b>=a.displayTime&&(c("next banner for z
one: "+a+" | curr display time: "+b),a.nextBanner())};this.start=function(){!b&&
(b=!0)&&Ga.register(this.run)};var h=function(a,b){a[b]=!0;c("set "+b+" in zone:
"+a.id)};this.init=function(){var a,b;b=d.getParam("luz","listAutoUpdateZones",
"");if(""!=(b=d.util.trim(b)))if("*"==
b)d.zone.eachZone(function(a){h(a,"autoUpdateOn")});else{b=b.split(",");for(var
c=0,e=b.length;c<e;c++)(a=d.zone.getZone(b[c]))&&h(a,"autoUpdateOn")}b=d.getPara
m("lqz","listAutoUpdateQueueZones","");if(""!=(b=d.util.trim(b)))if("*"==b)d.zon
e.eachZone(function(a){h(a,"autoUpdateQueueOn")});else{b=b.split(",");c=0;for(e=
b.length;c<e;c++)(a=d.zone.getZone(b[c]))&&h(a,"autoUpdateQueueOn")}d.getParam("
tbu","trackBannersUpdateOn",!1,!0)&&this.start()}}(B),Yb=new function(a){var b,c
,h,g,e,l=function(b){a.log("gtsManager: "+
b)},x=function(a,b){b&1&&(a.gtsContiguousTimestamp=0,a.gtsContiguousCounter=0,a.
gts2ContiguousTimestamp=0,a.gts2ContiguousCounter=0,a.gtsrContiguousTimestamp=0,
a.gtsrContiguousCounter=0);b&2&&(a.gtsCounter=0,a.gts2Counter=0,a.gtsrCounter=0)
};this.run=function(a){var e=+new Date,m,p;if(a.currView&&(a.isGtsTrackable&&a.b
annerId||a.isGtsTrackableReport)){var q;q=a.calculateVisibleTime(e);m=a.gtsConti
guousTimestamp||a.bannerTimer.startTime();m=(e||+new Date)-m;m!=e&&m>=b&&(p=!0,a
.gtsContiguousCounter++,
a.gtsContiguousTimestamp=e,l("zone: "+a.id+" reached GTS contiguous with duratio
n: "+m+" ("+a.gtsContiguousCounter+")"),m={bannerId:a.bannerId,zoneId:a.id,campa
ignId:a.campaignId,isContinuous:!0},a.isGtsTrackable&&h&&(m.action="gtsc")&&J&&J
.sendGtsNotification(m));q!=e&&Math.floor(q/b)>a.gtsCounter&&(p=!0,a.gtsCounter+
+,l("zone: "+a.id+" reached GTS with total display time: "+q+" ("+a.gtsCounter+"
)"),m={bannerId:a.bannerId,zoneId:a.id,campaignId:a.campaignId},a.isGtsTrackable
&&h&&(m.action="gts")&&
J&&J.sendGtsNotification(m),d.events.emit("bannerGts",a,a.queue.getCurrent()));g
&&p&&y&&y.sendLastViewportState();a.isGtsTrackableReport&&(q!=e&&Math.floor(q/c)
>a.gtsrCounter&&(a.gtsrCounter++,l("zone: "+a.id+" reached report GTS with total
display time: "+q+" ("+a.gtsrCounter+")"),m={bannerId:a.bannerId,zoneId:a.id,ca
mpaignId:a.campaignId},(m.action="gtsr")&&J&&J.sendGtsNotification(m)),p=a.gtsrC
ontiguousTimestamp||a.bannerTimer.startTime(),m=(e||+new Date)-p,m!=e&&m>=c&&(a.
gtsrContiguousCounter++,
a.gtsrContiguousTimestamp=e,l("zone: "+a.id+" reached report GTS contiguous with
duration: "+m+" ("+a.gtsrContiguousCounter+")"),m={bannerId:a.bannerId,zoneId:a
.id,campaignId:a.campaignId,isContinuous:!0},a.isGtsTrackableReport&&(m.action="
gtscr")&&J&&J.sendGtsNotification(m)),0<=a.visibleTime2ndPrint&&(q-=a.visibleTim

e2ndPrint,q!=e&&Math.floor(q/c)>a.gts2Counter&&(a.gts2Counter++,l("zone: "+a.id+
" reached 2nd print report GTS with total display time: "+q+" ("+a.gts2Counter+"
)"),m={bannerId:a.bannerId,
zoneId:a.id,campaignId:a.campaignId},(m.action="gtsr2")&&J&&J.sendGtsNotificatio
n(m)),q=a.gts2ContiguousTimestamp||a.bannerTimer.startTime(),m=(e||+new Date)-q,
m!=e&&m>=c&&(a.gts2ContiguousCounter++,a.gts2ContiguousTimestamp=e,l("zone: "+a.
id+" reached 2nd print report GTS contiguous with duration: "+m+" ("+a.gts2Conti
guousCounter+")"),m={bannerId:a.bannerId,zoneId:a.id,campaignId:a.campaignId,isC
ontinuous:!0},a.isGtsTrackableReport&&(m.action="gtscr2")&&J&&J.sendGtsNotificat
ion(m))))}};var p=function(a,
b){var c;!b.gtsTrackerSent&&b.gtsTrackerUrl&&(c="gtstracker-"+a.id+"-"+b.bannerI
d+"-"+b.entryId,m(c,b.gtsTrackerUrl),b.gtsTrackerSent=!0)},q=function(a,b){if(e&
&!b.gtsTrackerInternalSent){var c,g;"["==e[0]?g=JSON.parse(e):(g=[])&&g.push(e);
for(var h=0,p=g.length;h<p;h++)c="gtstrackeri-"+a.id+"-"+b.bannerId+"-"+b.entryI
d,m(c,d.util.trim(g[h]));b.gtsTrackerInternalSent=!0}},m=function(a,b){l("### ad
d GTS tracker with class: "+a+" to DOM with url: "+b);var c=document.createEleme
nt("IMG");c.setAttribute("class",
a);c.setAttribute("style","width:0;height:0;display:none;");c.setAttribute("src"
,b);document.body.appendChild(c)};this.setGtsTracker=p;this.setGtsTrackerInterna
l=q;this.init=function(){a:if(d.getParam("ugo","updateGTSOn",!1,!0)){var a=d.get
Param("ugs","updateGTSMs",3E4),m=d.getParam("lug","listUpdateOnGtsZones","");if(
0==d.util.trim(m).indexOf("["))m=JSON.parse(m);else if(0==d.util.trim(m).indexOf
("{"))m=[JSON.parse(m)];else{var f=m.split(",");if(1==f.length&&""==d.util.trim(
f[0]))break a;for(var m=
[],j=0,n=f.length;j<n;j++)m.push({z:f[j],d:a})}for(j=m.length;j--;)if(f=d.zone.g
etZone(m[j].z))n=m[j].d||a,l("set update on gts in zone: "+f.id+" with delay: "+
n),function(a,b){setTimeout(function(){a.nextBanner()},b)}(f,n)}var r=d.getParam
("gto","gtsTrackerOn",!1,!0),t=d.getParam("gti","gtsTrackerInternalOn",!1,!0),m=
d.getParam("lgz","listGtsZones",""),j=d.getParam("lgr","listReportGtsZones",""),
a=d.getParam("tgr","trackGTSReportOn",!1,!0);b=d.getParam("gts","gtsDurationMs",
2E4);h=d.getParam("gno",
"gtsNotificationOn",!1,!0);g=d.getParam("sgo","sendStatusOnGtsOn",!0,!0);c=d.get
Param("rgs","reportGtsDurationMs",2E4);e=d.getParam("lgt","listGtsTrackerUrls","
");var s=j.split(","),f=m.split(",");if(!a&&1==s.length&&""==d.util.trim(s[0])&&
!a&&1==f.length&&""==d.util.trim(f[0]))l("not tracking GTS");else{for(m=f.length
;m--;)j=f[m],(z=d.zone.getZone(j))?(z.gtsContiguousTimestamp=0,z.gtsCounter=0,z.
gtsContiguousCounter=0,z.isGtsTrackable=!0,l("track GTS in zone: "+z.id)):l("not
tracking GTS for not found zone: "+
j);a&&(s=[],d.zone.eachZone(function(a){s.push(a)}));for(m=s.length;m--;){if("st
ring"==typeof(z=s[m]))if(!(z=d.zone.getZone(z)))continue;"undefined"==typeof z.g
tsContiguousTimestamp&&(z.gtsContiguousTimestamp=0,z.gtsCounter=0,z.gtsContiguou
sCounter=0);z.isGtsTrackableReport=!0;z.gtsrCounter=0;z.gtsrContiguousCounter=0;
z.gtsrContiguousTimestamp=0;l("track GTS to report in zone: "+z.id)}d.extension.
add("core.zone.tostring",function(a,b){b.isGtsTrackableReport=a.isGtsTrackableRe
port;b.isGtsTrackable=
a.isGtsTrackable;b.gtsCounter=a.gtsCounter;b.gtsContiguousCounter=a.gtsContiguou
sCounter;return b});Ga.register(this.run);d.events.listen(d.events.eventType.ban
nerInTentative,function(a,b){if(a.isGtsTrackable||a.isGtsTrackableReport)l("bann
er in view "+(b.bannerId?"(from print)":"in zone: "+a.id)),"undefined"==typeof b
.bannerId&&x(a,1)});d.events.listen(d.events.eventType.bannerPrint,function(a){i
f(a.isGtsTrackable||a.isGtsTrackableReport)l("banner print in zone:"+a.id),x(a,3
)});((e=d.util.trim(e))||
r)&&d.events.listen("bannerGts",function(a,b){r&&p(a,b);t&&q(a,b)});a=d.getParam
("rgd","reportGtsDelayMs",3E4);0<a&&(l("start simulated 2nd print in "+a+" ms"),
setTimeout(function(){var a=+new Date;d.zone.eachZone(function(b){b.isGtsTrackab
leReport&&(b.visibleTime2ndPrint=b.currView?b.calculateVisibleTime(a):b.visibleT
ime,b.gts2Counter=0,b.gts2ContiguousCounter=0,b.gts2ContiguousTimestamp=a,l("sta
rt visible time for 2nd print GTS in zone "+b.id+" | current visible time: "+b.v
isibleTime2ndPrint+" (status:"+
(b.currView?"":" not")+" visible)"))})},a))}}}(B),Zc=new function(a){var b=funct

ion(b){this.options=b;this.zone=this.options.zone;this.stickyOn=!1;this.focusIn=
this.stickyModeOn=!0;this.replacer=document.createElement("DIV");this.replacer.s
tyle.display="none";this.replacer.style.visibility="hidden";this.replacer.style.
height=this.zone.height+"px";this.replacer.style.width=this.zone.width+"px";this
.zone.element.parentNode.insertBefore(this.replacer,this.zone.element);var c="St
ickyBehavior_"+this.zone.id;
this.log=function(b){a.log(c+": "+b)};this.log("sticky behavior attached for cam
paigns: "+this.options.campaigns.join())};b.prototype.onChange=function(){if(thi
s.stickyOn){var a=d.util.viewport.scrollTop();a<=this.revertPosTop&&this.revertP
osTop<=a+d.util.viewport.height()&&(g(this,this.zone),this.stickyOn=!1)}};b.prot
otype.bannerIn=function(a){this.log("banner in view");a.id==this.zone.id&&(this.
stickyOn&&-1==this.options.campaigns.indexOf(a.campaignId))&&(g(this,this.zone),
this.stickyOn=!1)};b.prototype.bannerOut=
function(a,b){this.log("banner out "+JSON.stringify(b));if(!(b.reset||a.id!=this
.zone.id)&&!b.bannerId)this.stickyOn?this.flagReset&&(this.stickyOn=this.flagRes
et=!1):-1!=this.options.campaigns.indexOf(a.campaignId)&&(p("sticky on in zone:
"+a.id),c(this,a),y&&y.sendViewportState())};b.prototype.bannerPrint=function(a)
{a.id==this.zone.id&&(!a.currView&&-1!=this.options.campaigns.indexOf(a.campaign
Id))&&(c(this,a),y&&y.sendViewportState())};b.prototype.destroy=function(){this.
log("destroy");this.toggleEvents(!1)};
b.prototype.addCampaign=function(a){this.options.campaigns.push(a)};b.prototype.
isActive=function(){return this.stickyModeOn};b.prototype.toggleEvents=function(
a){var b=this;this.changeHnd=function(){b.isActive()&&b.onChange.apply(b,Array.p
rototype.slice.call(arguments))};this.bannerInHnd=function(){b.isActive()&&b.ban
nerIn.apply(b,Array.prototype.slice.call(arguments))};this.bannerOutHnd=function
(){b.isActive()&&b.bannerOut.apply(b,Array.prototype.slice.call(arguments))};thi
s.bannerPrintHnd=function(){b.isActive()&&
b.bannerPrint.apply(b,Array.prototype.slice.call(arguments))};a?(d.events.listen
("scroll",this.changeHnd),d.events.listen("resize",this.changeHnd),d.events.list
en(d.events.eventType.bannerInTentative,this.bannerInHnd),d.events.listen(d.even
ts.eventType.bannerOut,this.bannerOutHnd),d.events.listen(d.events.eventType.ban
nerPrint,b.bannerPrint,b)):(d.events.unlisten("scroll",this.changeHnd),d.events.
unlisten("resize",this.changeHnd),d.events.unlisten(d.events.eventType.bannerInT
entative,this.bannerInHnd),
d.events.unlisten(d.events.eventType.bannerOut,this.bannerOutHnd),d.events.unlis
ten(d.events.eventType.bannerPrint,b.bannerPrint))};b.prototype.start=function()
{(!this.options.userOptOut||!this.options.core.util.cookies.readCookie("ws-sbo")
)&&this.toggleEvents(!0)};b.prototype.update=function(){this.stickyOn&&(p("zone
size changed: "+this.zone.width+":"+this.zone.height),h(this,this.zone))};b.prot
otype.checkCampaign=function(a){return-1!=this.options.campaigns.indexOf(a)};var
c=function(a,b){a.stickyOn=
!0;var c=b.top;a.revertStyle={position:b.element.style.position,top:b.element.st
yle.top,bottom:b.element.style.bottom,left:b.element.style.left,right:b.element.
style.right,zindex:b.element.style.zIndex};a.log("activate with revert pos: "+c+
" and style: "+JSON.stringify(a.revertStyle));a.revertPosTop=c;a.revertPosLeft=b
.left+b.width;a.replacer.style.display="block";h(a,b)},h=function(a,b){var c=par
seInt(b.height);b.element.style.top="";b.element.style.bottom=a.options.marginBo
ttom+"px";b.element.style.left=
"";b.element.style.right=a.options.marginRight+"px";b.element.style.zIndex=99999
99;b.element.style.position="fixed";if(a.closeDiv)a.closeDiv.style.visibility="v
isible";else{var d=document.createElement("DIV");d.style.zIndex=9999999;d.style.
position="fixed";d.innerHTML='<img id="stickyclose_'+b.id+'" style="align:right;
" src="http://images.webspectator.com/close.png"></img>';d.onclick=function(){va
r b=a.zone;a.log("close sticky");g(a,b,!0);a.options.pageviewOptOut&&(a.stickyMo
deOn=!1,a.destroy());
a.options.userOptOut&&a.options.core.util.cookies.createCookie("ws-sbo","1",1)};
document.body.appendChild(d);a.closeDiv=d}a.closeDiv.style.bottom=a.options.marg
inBottom+c-10+"px";a.closeDiv.style.right=a.options.marginRight+"px"},g=function
(a,b,c){a.log("sticky off in zone: "+b.id);a.log("revert sticky (stickyOn:"+a.st
ickyOn+") with style: "+JSON.stringify(a.revertStyle));a.closeDiv.style.visibili

ty="hidden";var d=a.revertStyle;b.element.style.position=d.position;b.element.st
yle.top=d.top;b.element.style.bottom=
d.bottom;b.element.style.left=d.left;b.element.style.right=d.right;b.element.sty
le.zIndex=d.zindex;a.replacer.style.display="none";c&&(a.flagReset=!0,y&&y.sendV
iewportState())},e,l,f,p=function(b){a.log("stickyBannersManager: "+b)},q=functi
on(a){p("size update in zone: "+a.id+" ("+a.width+":"+a.height+")");a.decorator
StickyBanner&&a.decoratorStickyBanner.update()};this.init=function(){var a=d.get
Param("lsz","listStickyZones","");if(""!=(a=d.util.trim(a))){var c=d.getParam("l
sc","listStickyCampaigns",
"");e=parseInt(d.getParam("sbr","stickyBannerRightMargin",20));l=parseInt(d.getP
aram("sbb","stickyBannerBottomMargin",50));f=d.getParam("soo","stickyBannersOptO
utOn",!0,!0);var g,h=[];"*"==a?g=!0:h=a.split(",");var j=c.split(",");d.zone.eac
hZone(function(a){if(g||-1!=h.indexOf(a.id))p("allow sticky banner in zone: "+a.
id),a.decoratorStickyBanner=new b({zone:a,core:d,userOptOut:f,pageviewOptOut:!0,
campaigns:j,marginBottom:l,marginRight:e}),a.decoratorStickyBanner.start()});d.e
vents.listen("zoneSizeUpdate",
q)}}}(B),Vb=new function(){var a,b=JSON.parse(d.util.cookies.readCookie("ws-obp"
))||{},c;this.overlayBanner=function(a,c){this.zone=a.zone;this.width=a.width;th
is.height=a.height;this.replacer=a.replacer;this.posX=a.posX||{pos:"right",dist:
0};this.posY=a.posY||{pos:"bottom",dist:0};this.timeout=a.timeout||0;this.always
Inside="undefined"!=typeof a.alwaysInside?a.alwaysInside:!0;this.contentDiv=this
.closeDiv="";this.shadowDiv=a.overlayPage||!1;this.displayTimeout=0;this.animeIn
terval=null;this.animation=
a.animation||"vertical";this.animeIter=a.animeIter||100;this.animeDur=a.animeDur
||2;this.iterations=0;this.zIndex=a.zIndex||2147483646;this.border="undefined"!=
typeof a.border?a.border:!0;this.started=!1;this.animString=a.animString;this.tr
ansEvent=a.transEvent;this.reOpen=a.reOpen||"true";this.retries=0;var e=!1;this.
updateClose=function(){this.closeDiv.style.left=parseInt(this.contentDiv.style.w
idth.substr(0,this.contentDiv.style.width.length-2))-10+"px"};this.updateLeft=fu
nction(){this.decorator.style.left=
this.posX.dist-d.util.viewport.scrollLeft()+"px"};this.updateSize=function(){for
(var a=d.zone.getZone(this.replacer).element,b=a.offsetLeft;a.offsetParent;)a=a.
offsetParent,b+=a.offsetLeft;this.posX.dist=b;this.decorator.style.left=this.pos
X.dist-d.util.viewport.scrollLeft()+"px"};this.setCss=function(){this.contentDiv
.style.width=this.width+"px";this.contentDiv.style.height=this.height+"px";var a
=this.decorator;a.style.display="none";a.style.zIndex=this.zIndex;if("center"!=t
his.posX.pos)if(this.replacer){for(var b=
d.zone.getZone(this.replacer).element,e=b.offsetLeft;b.offsetParent;)b=b.offsetP
arent,e+=b.offsetLeft;this.posX={pos:"left",dist:e};d.events.listen(d.events.eve
ntType.scroll,this.updateLeft,this);d.events.listen(d.events.eventType.resize,th
is.updateSize,this);a.style.left=e-d.util.viewport.scrollLeft()+"px"}else c?(e=t
his.posX.dist+(d.util.viewport.width()-c.substring(0,c.length-2)),a.style[this.p
osX.pos]=0<e?e/2+"px":e+"px"):a.style[this.posX.pos]=this.posX.dist+"px";else a.
style.margin="0 auto",
a.style.left=0,a.style.right=0;a.style[this.posY.pos]=this.posY.dist+"px";a.styl
e.position=this.alwaysInside?"fixed":"absolute";this.border?(this.decorator.styl
e.width=this.width+20+"px",this.decorator.style.height=this.height+30+"px",this.
decorator.style.backgroundColor="#f2f2f2",this.decorator.style.border="1px solid
#cccccc",this.decorator.style.borderRadius="bottom"==this.posY.pos?"5px 5px 0px
0px":"0px 0px 5px 5px",this.contentDiv.style.margin="0px auto",this.contentDiv.
style.bottom="2px"):(this.decorator.style.width=
this.width+"px",this.decorator.style.height=this.height+"px",this.contentDiv.sty
le.position="absolute",this.contentDiv.style.top="0px")};this.animate=function()
{var a=this.decorator;if("grow"==this.animation)this.contentDiv.style.width=this
.iterations/this.animeIter*this.width+"px",this.contentDiv.style.height=this.ite
rations/this.animeIter*this.height+"px",this.updateClose(),this.iterations++>=th
is.animeIter&&(clearInterval(this.animeInterval),y&&y.sendViewportState());else
if("vertical"==this.animation)if(this.animString)a.style[this.animString]=
this.posY.pos+" "+this.animeDur+"s",b[this.zone]||(a.style[this.posY.pos]=-1*thi
s.height+"px",window.getComputedStyle(a)[this.posY.pos],a.style[this.posY.pos]=t

his.posY.dist+"px");else if(e){var h=parseInt(a.style[this.posY.pos].substr(0,a.


style[this.posY.pos].length-2))+10;a.style[this.posY.pos]=h+"px";h>=this.posY.di
st&&(clearInterval(this.animeInterval),y&&y.sendViewportState())}else{e=!e;a.sty
le[this.posY.pos]=-1*this.height+"px";var m=this;this.animeInterval=setInterval(
function(){m.animate()},
1E3*(this.animeDur/this.animeIter))}else"horizontal"==this.animation&&(this.anim
String?(a.style[this.animString]=this.posX.pos+" "+this.animeDur+"s",a.style[thi
s.posX.pos]=-1*this.width+"px",window.getComputedStyle(a)[this.posX.pos],a.style
[this.posX.pos]=this.posX.dist+"px"):e?(h=parseInt(a.style[this.posX.pos].substr
(0,a.style[this.posX.pos].length-2))+10,a.style[this.posX.pos]=h+"px",h>=this.po
sX.dist+(d.util.viewport.width()-c.substring(0,c.length-2))/2&&(clearInterval(th
is.animeInterval),y&&
y.sendViewportState())):(e=!e,a.style[this.posX.pos]=-1*this.width+"px",m=this,t
his.animeInterval=setInterval(function(){m.animate()},1E3*(this.animeDur/this.an
imeIter))))};this.show=function(){var a=this.decorator;this.contentDiv.style.dis
play="block";a.style.display="block";var c=this;b[this.zone]&&!this.started&&(th
is.border&&this.toggle(),y&&y.sendViewportState());this.animate();this.started=!
0;this.timeout&&(this.displayTimeout=setTimeout(function(){c.close()},1E3*this.t
imeout))};this.close=
function(){var a=this.decorator;a.style.display="none";if("true"==this.reOpen){t
his.contentDiv.style.display="none";var b=this;y&&y.sendViewportState();window.s
etTimeout(function(){if(!b.replacer||!d.zone.getZone(b.replacer).currView)d.zone
.getZone(b.zone).nextBanner(),y&&y.sendViewportState()},2E4)}else this.replacer|
|(this.displayTimeout&&clearTimeout(this.displayTimeout),a.parentNode.removeChil
d(a),this.shadowDiv&&this.shadowDiv.parentNode.removeChild(this.shadowDiv),d.zon
e.deleteZone(this.zone))};
this.shadowOverlay=function(){if(this.shadowDiv){this.shadowDiv=document.createE
lement("DIV");this.contentDiv.style.zIndex=this.zIndex-1;this.shadowDiv.style.ba
ckground="#000000";this.shadowDiv.style.opacity="0.6";this.shadowDiv.style.posit
ion="absolute";this.shadowDiv.style.top=0;this.shadowDiv.style.bottom=0;this.sha
dowDiv.style.left=0;this.shadowDiv.style.right=0;this.shadowDiv.setAttribute("id
","shadow");document.body.appendChild(this.shadowDiv);var a=this;d.util.bind(thi
s.shadowDiv,"click",function(){a.shadowDiv.parentNode.removeChild(a.shadowDiv);
a.shadowDiv=null})}};this.createHeader=function(){if(this.border){var a=this,b=d
ocument.createElement("DIV");b.style.width=this.width+"px";b.style.margin="0px a
uto";b.style.height="20px";b.style.position="relative";var c=document.createElem
ent("IMG");c.src="http://images.webspectator.com/logo.png";c.style.width="16px";
c.style.paddingTop="2px";c.style.display="inline";b.appendChild(c);c=document.cr
eateElement("IMG");c.src="bottom"==this.posY.pos?"http://images.webspectator.com
/btn_fechar.png":"http://images.webspectator.com/btn_expandir.png";
c.style.paddingTop="6px";c.style.paddingLeft="2px";c.style.right="0px";c.style.w
idth="9px";c.style.position="absolute";c.style.cursor="pointer";this.toggled=!0;
d.util.bind(c,"click",function(){a.toggle()});b.appendChild(c);this.animString&&
(this.decorator.style[this.animString]="bottom "+this.animDur+"s");d.util.bind(t
his.decorator,this.transEvent,function(){y&&y.sendViewportState()});this.toggleI
mg=c;return b}this.closeDiv=document.createElement("DIV");this.closeDiv.style.zI
ndex=this.zIndex+1;this.closeDiv.style.position=
"relative";this.closeDiv.innerHTML="<img style='width=100%; align:right;' src =
'http://images.webspectator.com/close.png'></img>";this.updateClose();a=this;d.u
til.bind(this.closeDiv,"click",function(){a.close()});return this.closeDiv};this
.toggle=function(){(this.toggled=!this.toggled)?(delete b[this.zone],d.util.cook
ies.createCookie("ws-obp",JSON.stringify(b),1),this.toggleImg.src="bottom"==this
.posY.pos?"http://images.webspectator.com/btn_fechar.png":"http://images.webspec
tator.com/btn_expandir.png",
this.decorator.style.bottom="",this.contentDiv.style.display="block",this.decora
tor.style[this.posY.pos]=this.posY.dist+"px"):(b[this.zone]=1,d.util.cookies.cre
ateCookie("ws-obp",JSON.stringify(b),1),this.toggleImg.src="bottom"==this.posY.p
os?"http://images.webspectator.com/btn_expandir.png":"http://images.webspectator
.com/btn_fechar.png",this.decorator.style.top="",this.contentDiv.style.display="
none",this.decorator.style[this.posY.pos]=-1*this.decorator.style.height.substri

ng(0,this.decorator.style.height.length2)+20+"px");y&&y.sendViewportState()};this.inView=function(a){a.id==this.replace
r&&(this.decorator.style.display="none",y&&y.sendViewportState())};this.outView=
function(a){a.id==this.replacer&&y.isFocused()&&(this.started||d.zone.getZone(th
is.zone).nextBanner(),this.show())};this.contentDiv=document.createElement("DIV"
);this.decorator=document.createElement("DIV");this.contentDiv.setAttribute("dat
a-pid",this.zone);this.setCss();this.shadowOverlay();var l=this.createHeader();"
bottom"==this.posY.pos?
(this.decorator.appendChild(l),this.decorator.appendChild(this.contentDiv)):(thi
s.decorator.appendChild(this.contentDiv),this.decorator.appendChild(l),l.style.b
ottom="0px",this.contentDiv.style.marginTop="10px",l.style.position="absolute",l
.style.left="10px");this.contentDiv.style.display="none";document.body.appendChi
ld(this.decorator);this.repositionDiv=function(){var a=this.posX.dist+(d.util.vi
ewport.width()-c.substring(0,c.length-2));this.decorator.style[this.posX.pos]=0<
a?a/2+"px":a+"px"};if(c){var f=
this;d.util.bind(window,"resize",function(){f.repositionDiv()})}this.replacer&&(
f=this,d.events.listen(d.events.eventType.bannerInTentative,f.inView,f),d.events
.listen(d.events.eventType.bannerOut,f.outView,f))};this.init=function(){c=JSON.
parse(d.getParam("obc","overlaybannercontainer","{}"));c.type||(c=0);"id"==c.typ
e&&(c=d.util.DOM.getElementCss(document.getElementById(c.value)).width);"class"=
=c.type&&(c=d.util.DOM.getElementCss(document.getElementsByClassName(c.value)[0]
).width);var b=!1,e="transition",
f="transitionend",l=["webkit","Moz","O","MS","Khtml"],j="";"undefined"!=typeof d
ocument.body.style.transition&&(b=!0);if(!1===b)for(j=0;j<l.length;j++)if(void 0
!==document.body.style[l[j]+"Transition"]){j=l[j];e=j+"Transition";f=e+"End";b=!
0;break}a=JSON.parse(d.getParam("obp","overlayBannerParameters","[]"),c);for(j=a
.length;j--;){var p=a[j];b&&(p.animString=e,p.transEvent=f);var l=new this.overl
ayBanner(p,c),q=d.zone.createZone(l.zone,l.contentDiv,{InitializeInView:!1});q.i
sOverlay=l;p.replacer||
function(a){window.setTimeout(function(){a.nextBanner()},p.delay||0)}(q)}B.log("
init overlay")}}(B);B.init=function(){S=r.instrumentation;J=r.messaging;y=r.trac
king;za=r.ortc;B.log("init display")};B.reset=function(){Ga.reset()};B.ready=fun
ction(){Yc.init();d.globalParameters.scriptInFrameOn||(Vb.init(),Zc.init());Yb.i
nit();Ub.init();B.log("ready display")};Ob=d.getParam("bdt","bannerDisplayTime",
2E4);Pb=d.getParam("bmo","bitMessageOn",!1,!0);Mb=d.getParam("tlo","timerLoopEve
ntOn",!0,!0);Qb=d.getParam("rbd",
"requestBannerRetryDelayMs",2E3);Nb=d.getParam("sbv","sendBitInViewOn",!1,!0);Va
=d.getParam("rbr","requestBannerMaxRetries",1);Tb=d.getParam("rsm","cbReqScriptM
ode",1);Rb=d.getParam("ubv","updateBannerOnView",!0,!0);Sb=d.getParam("tsg","gts
TrackerServerOn",!1,!0);Ea=d.getParam("coe","closeOnEmpty",!0,!0);d.events.liste
n(d.events.eventType.bannerIn,function(a){B.log("banner in view: "+a.bannerId+"
in zone: "+a)});d.events.listen(d.events.eventType.bannerInTentative,function(a)
{B.log("banner in tentative view: "+
a.bannerId+" in zone: "+a);if(a.updateOnView){var b=a.updateOnView.entry,c=a.upd
ateOnView.cb;a.updateOnView=null;a.updateBanner(b,c)}else a.bitPayload&&(J&&J.se
ndImpressionNotification(a.bitPayload),a.bitPayload=null)});d.events.listen(d.ev
ents.eventType.bannerOut,function(a){B.log("banner out view: "+a.bannerId+" in z
one: "+a)});d.events.listen(d.events.eventType.bannerPrint,function(a){B.log("on
BannerPrint");if(Pb){var b={bannerId:a.bannerId,zoneId:a.id,campaignId:a.campaig
nId};a.currView||!Nb?
J&&J.sendImpressionNotification(b):a.bitPayload=b}y&&y.sendViewportState();d&&d.
util.raiseEvent(d.util.scriptEvents.zoneStatusChanged,{action:"bannerChanged",zo
ne:a})});d.events.listen(d.events.eventType.messageReceived,function(a){switch(a
.a){case "cb":Fa(a);break;case "cbresp":Fa(a,!0);break;default:B.log("!!unknown
action in message: "+JSON.stringify(a))}});d.events.listen(d.events.eventType.ba
nnerResize,function(a){var b=d.zone.getZone(a.zone);b.width=a.width;b.height=a.h
eight;document.getElementById(a.id).style.width=
b.width+"px";document.getElementById(a.id).style.height=b.height+"px";0.01!=a.le
ft&&(document.getElementById(a.id).style.left=a.left+"px");d.events.emit("zoneSi
zeUpdate",b)});var D=d.zone.getPrototype();D.displayTrackingHnd=null;D.fetchingB

anner=!1;D.autoUpdateOn=!1;D.autoUpdateQueueOn=!1;D.updateCount=0;D.bannerEntere
dView=!1;D.bannerInViewMessage=null;D.queue=null;D.categories=null;D.bannerTimer
=null;D.processingBanner=!1;D.bitPayload=null;D.calculateVisibleTime=function(a)
{return this.visibleTime+
((a||+new Date)-this.bannerTimer.startTime())};D.calculatePartialVisibleTime=fun
ction(a){return(a||+new Date)-this.bannerTimer.startTime()};D.initDisplayZone=fu
nction(){for(var a,b=0;b<this.element.childNodes.length;b++){var c=this.element.
childNodes[b].tagName;c&&"SCRIPT"!=c&&(a=b)}this.queue.add(this.bannerEntry.crea
te({bannerId:this.bannerId,campaignId:this.campaignId||0,html:this.element.inner
HTML,displayTime:this.displayTime,node:a}),null,!0);this.queue.dump("initial que
ue dump")};D.bannerFetched=
function(a){this.log("banner fetched for zone "+this.id);var b;null==(b=this.que
ue.get(a.entryId))?this.log("entry not found with index: "+a.entryId):a.entryId<
this.queue.index()?this.log("entry index is less than current queue index"):b.fe
tchingBanner?(b.retriesHnd&&(this.log("clear entry.retriesHnd: "+b.retriesHnd),c
learTimeout(b.retriesHnd)),b.requestEndTs=a.created,b.requestDurationMs=b.reques
tEndTs-b.requestBeginTs,this.bannerEntry.extend(b,a,!b.forceEntryOptions),this.l
og("updated entry from banner fetched:"+
b),b.bannerUpdatePending?(this.nextBanner(null,b,function(){b.fetchingBanner=!1}
),b.bannerUpdatePending=!1):b.fetchingBanner=!1):this.log("entry not fetching ba
nner:"+b.toString())};D.isFetchingCurrentBanner=function(){return this.queue.get
Current().fetchingBanner};D.nextBanner=function(a,b,c){var d=this;this.processin
gBanner=!0;b||(b=this.queue.getNext());null==b&&(this.log("queue empty"),b=this.
bannerEntry.create({zoneId:this.id}),this.bannerEntry.extend(b,a),this.queue.add
(b,null,!0),b.bannerUpdatePending=
!0);if(b.html)b.oneUpdate&&this.decOneUpdate(),a=function(){c&&c();d.processingB
anner=!1},!Rb||this.currView||this.isOverlay||this.decoratorStickyBanner&&this.d
ecoratorStickyBanner.checkCampaign(b.campaignId)?this.updateBanner(b,a):this.upd
ateOnView={entry:b,cb:a};else{if(b.fetchingBanner){this.throttlingBannerUpdate=!
0;this.log("enable throttling banner update in zone "+this.id);var e=this;setTim
eout(function(){e.throttlingBannerUpdate=!1;e.log("disable throttling banner upd
ate in zone "+e.id)},
5E3)}else Wb(this,b);this.processingBanner=!1;c&&c()}};D.updateBanner=function(a
,b){this.log("updatebanner "+this);for(var c=this.queue.getPrevious(),d=this.que
ue.getCurrent(),d=this.bannerEntry.extend(d,a),e=this,f=0;f<e.element.childNodes
.length;f++){var l=e.element.childNodes[f];1==l.nodeType&&"SCRIPT"!=l.nodeName&&
(l.getAttribute("visibid")||l.setAttribute("visibid",c.visibId),"none"!=l.style.
display&&l.getAttribute("visibid")!=d.visibId&&(l.style?"none"!=l.style.display&
&(l.style.display="none"):
l.setAttribute("style","display:none")))}var j=this,l=d,f=function(){var f=e.upd
ateBannerEnd(c,d);c.visibleTime=f.visibleTime;c.partialVisibleTime=f.partialVisi
bleTime;"r"==a.mode&&(f=e.bannerEntry.clone(c),"undefined"!=typeof f.mode&&delet
e f.mode,e.incOneUpdate(),f.oneUpdate=!0,e.queue.addToHead(f));"function"==typeo
f b&&b()};B.log("setContentFrame");var p;p="<html><head>"+("<script type='text/j
avascript'>function resizeFrame(id, firstpass) {var matchRegex = function (str,
re, matchIndex) {var ret = null;var matches = str.match(re);if (matches != null
&& matchIndex < matches.length)ret = matches[matchIndex];return ret;};var regWid
th = new RegExp('data-bannerWidth=(?:\\'|\\\")([^(\\'|\\\")]*)(?:\\'|\\\")');var
regHeight = new RegExp('data-bannerHeight=(?:\\'|\\\")([^(\\'|\\\")]*)(?:\\'|\\
\")');var width, height;width = matchRegex(document.body.innerHTML, regWidth, 1)
;height = matchRegex(document.body.innerHTML, regHeight, 1);window.minWidth = pa
rseInt(width)||0;window.minHeight = parseInt(height)||0;var size = checkResize()
;width = size[0] > width ? size[0] : width;height = size[1] > height ? size[1] :
height;left = size[2];if (width && width > 0 && height && height > 0 && (width
!= window.frameElement.style.width.substring(0, window.frameElement.style.width.
length - 2) || height != window.frameElement.style.height.substring(0, window.fr
ameElement.style.height.length - 2) ||left != window.frameElement.style.left.sub
string(0, window.frameElement.style.left.length - 2))) {app.core.events.emit('ba
nnerResize', { zone: window.frameElement.getAttribute('data-pid'), id: id, width
: width, height: height, left: left });}else if (firstpass && document.body.scro

llHeight && document.body.scrollWidth) {app.core.events.emit('bannerResize', { z


one: window.frameElement.getAttribute('data-pid'), id: id, width: document.body.
scrollWidth, height: document.body.scrollHeight, left: left });}};function check
Resize(node, currWidth, currHeight, currLeft) {if (!node) {node = document.body;
var currWidth = 0, currHeight = 0, currLeft = 0;} else {if (node.onpropertychang
e == null && node.attachEvent && node.getAttribute && !node.getAttribute('hasHan
dler')) {node.attachEvent('onpropertychange', onPropChangeHdl);node.setAttribute
('hasHandler', '1');}if (node.style && node.style.width.length > 2 && (!currWidt
h || node.style.position == 'absolute')) currWidth = node.style.width.substring(
0, node.style.width.length - 2);if (node.style && node.style.height.length > 2 &
& (!currHeight || node.style.position == 'absolute')) currHeight = node.style.he
ight.substring(0, node.style.height.length - 2);if (node.style && node.style.lef
t.length > 2 && !currLeft){currLeft = node.style.left.substring(0, node.style.le
ft.length - 2);if (node.style.left != '0.01px') {node.style.left = '0.01px';}}}f
or (var i = 0; i < node.childNodes.length; i++) {var res = checkResize(node.chil
dNodes[i], currWidth, currHeight, currLeft);if (!currWidth || (res[0] && parseIn
t(res[0]) > parseInt(currWidth)))currWidth = res[0];if (!currHeight || (res[1] &
& parseInt(res[1]) > parseInt(currHeight)))currHeight = res[1];if ((!currLeft ||
(res[2] && parseInt(res[2]) > parseInt(currLeft)))&&parseInt(currHeight) >= win
dow.minHeight && parseInt(currWidth) >= window.minWidth)currLeft = res[2];}retur
n [currWidth, currHeight, currLeft];}function onPropChangeHdl(event) {if (event.
srcElement.style.visibility != 'hidden') {resizeFrame(window.frameElement.id);}}
;function start() {if (window.MutationObserver || window.WebKitMutationObserver
|| window.MozMutationObserver) {var MutationObserver = window.MutationObserver |
| window.WebKitMutationObserver || window.MozMutationObserver;var observer = new
MutationObserver(function (mutations) {if (window.frameElement.style.visibility
!= 'hidden')resizeFrame(window.frameElement.id);});observer.observe(document.bo
dy, { attributes: true, childList: true, subtree: true, attributeFilter: ['style
'] });} else if (document.body && document.body.attachEvent != null) {function a
ddEvent(node) {if (node.attachEvent) {node.attachEvent('onpropertychange', onPro
pChangeHdl);node.setAttribute('hasHandler','1');}for (var i = 0; i < node.childN
odes.length; i++) {addEvent(node.childNodes[i]);}}addEvent(document.body);} else
{setInterval(function () {if (window.frameElement.style.visibility != 'hidden')
resizeFrame(window.frameElement.id);}, 500);}resizeFrame(window.frameElement.id,
1);};<\/script></head><body style='margin:0px;overflow:hidden' onload='start()'
><script>"+
l.html+"<\/script><script>/*if (typeof ebDoOnBannerScriptLoad != 'undefined') {e
bDoOnBannerScriptLoad();}*/<\/script><script>if(document.attachEvent)window.setT
imeout(function(){start()},1000)<\/script></body></html>");if(l.node||0==l.node)
for(p=0;p<j.element.childNodes.length;p++){var q=j.element.childNodes[p];1==q.no
deType&&("SCRIPT"!=q.nodeName&&q.hasAttribute("visibid")&&q.getAttribute("visibi
d")==l.visibId)&&(q.style.display="block")}else{var m=document.createElement("di
v");m.style.position=
"relative";m.setAttribute("visibid",l.visibId);q=document.createElement("iframe"
);q.style.border="none";q.id="bannerframe"+l.bannerId+ +new Date;q.async="true";
q.src="about:blank";q.frameBorder="no";q.style.overflow="visible";q.style.positi
on="relative";q.style.zIndex=2147483646;q.style.left="0px";q.style.top="0px";q.s
tyle.height="0px";q.style.width="0px";q.setAttribute("data-pid",j.id);m.appendCh
ild(q);j.element.appendChild(m);for(l.node=0;null!=(m=m.previousSibling);)l.node
++;l=q.contentDocument?
q.contentDocument:q.contentWindow?q.contentWindow.document:q.document;l.open();q
.contentWindow.app=r;m=q.contentWindow.location.href;-1==navigator.userAgent.ind
exOf("Firefox")&&"#"==m.charAt(m.length-1)&&q.contentWindow.location.replace(m+"
null");q.onload=function(){j.isOverlay&&!j.isOverlay.replacer&&j.isOverlay.show(
)};l.write(p);window.attachEvent||l.close();j.wsOwner=!0}"function"==typeof f&&f
()};D.updateBannerEnd=function(a,b){var c=+new Date,e=this.calculatePartialVisib
leTime(c),g=this.setVisibleTime(e);
this.bannerTimer.stop(c);this.bannerTimer.start(c);this.bannerId=b.bannerId;this
.campaignId=b.campaignId;this.impressionId=b.impressionId||0;this.displayTime=b.
displayTime;this.visibleTime=b.visibleTime||0;this.remnant=b.remnant;this.log("u

pdated zone "+this+" with banner data: "+JSON.stringify(b));this.currView&&(d.ev


ents.emit(d.events.eventType.bannerOut,this,a),this.bannerEnteredView=!0,d.event
s.emit(d.events.eventType.bannerInTentative,this,b));d.events.emit(d.events.even
tType.bannerPrint,this);
return{partialVisibleTime:e,visibleTime:g}};D.updateBannerMarkup=function(a){thi
s.element.innerHTML=a};D.incOneUpdate=function(){this.updateCount+=1};D.decOneUp
date=function(){this.updateCount-=1};D.changeBanner=function(a){this.log("change
banner :"+this);a.zoneId=this.id;a=this.bannerEntry.create(a);a.bannerUpdatePend
ing=!0;this.queue.addToHead(a);this.nextBanner()};D.addBanner=function(a){var b=
this.bannerEntry.create(a);this.queue.add(b);a.fetchBanner&&Wb(this,b)};D.banner
Entry=new function(){this.create=
function(a){var b={toString:function(){return JSON.stringify(this)}},b=this.exte
nd(b,a);b.visibId=+new Date+""+Math.floor(1E3*Math.random());return b};this.exte
nd=function(a,b,c){"undefined"==typeof c&&(c=!0);for(var d in b)if(null!=b[d]&&(
c||"undefined"==typeof a[d]))a[d]=b[d];return a};this.clone=function(a){return t
his.extend({},a)};this.dummy=function(){return this.create({id:0,html:"<dummy/>"
,displayTime:0})}};D.setCategoriesHint=function(a){this.categories=null==a?[]:"s
tring"===typeof a?[].push(a):
a};d.extension.add("tracking.upgradeFromTentativeView",function(a){B.log("upgrad
eFromTentativeView: "+a);a.bannerEnteredView&&(a.bannerEnteredView=!1,d.events.e
mit(d.events.eventType.bannerIn,{zone:a,bannerId:a.bannerId}))});d.extension.add
("tracking.inTentativeView",function(a,b){return b||a.bannerEnteredView});d.exte
nsion.add("core.zone.start",function(){this.initDisplayZone();this.log("startDis
play")});d.extension.add("core.zone.del",function(a){this.currView&&(a=this.bann
erTimer.stop(a),this.setVisibleTime(a),
d.events.emit(d.events.eventType.bannerOut,this,{inTentativeView:this.bannerEnte
redView,visibleTime:a}));clearInterval(this.displayTrackingHnd);this.log("delDis
play")});d.extension.add("core.zone.getdata",function(a){a.bannersQueue={};a.ban
nersQueue.queue=this.queue.getData();a.bannersQueue.currentIndex=this.queue.inde
x();return a});d.extension.add("tracking.intoview",function(a){this.bannerTimer.
start(a.timeStamp);this.bannerEnteredView=!0;d.events.emit(d.events.eventType.ba
nnerInTentative,this,
a)});d.extension.add("tracking.outofview",function(a){var b=this.bannerTimer.sto
p(a.timeStamp);this.setVisibleTime(b);this.bannerEnteredView=!1;d.events.emit(d.
events.eventType.bannerOut,this,a)});d.extension.add("core.zone.tostring",functi
on(a,b){b.fetchingBanner=a.fetchingBanner;b.autoUpdateOn=a.autoUpdateOn;b.autoUp
dateQueueOn=a.autoUpdateQueueOn;b.updateCount=a.updateCount;b.bannerEnteredView=
a.bannerEnteredView;b.bannerTimer=JSON.stringify(a.bannerTimer.toJSON());return
b});d.extension.add("core.zone.init",
function(){var a=this;this.updateCount=0;this.displayTime=Ob;this.bannerTimer=ne
w d.util.PartialTimer;this.queue=new function(a){var c=[],d=-1;this.clear=functi
on(){c=[]};this.dump=function(e){var f=c.length;e&&a.log(e+"\n");a.log("banner's
queue dump (size:"+f+", index:"+d+"):\n");for(e=0;e<f;e++)a.log((e===d?">>>":""
)+" ("+e+"): "+c[e]+"\n");a.log("found "+f+" entries in queue")};this.index=func
tion(){return d};this.get=function(a){return c[a]};this.add=function(a,b,e){b?c.
splice(b,0,a):c.push(a);
a.index=b?b:c.length-1;e&&(d+=1)};this.addToHead=function(a){var b=d+1;this.add(
a,b);a.index=b};this.getCurrent=function(){return c[d]};this.setCurrent=function
(a){c[d]=a};this.getNext=function(){return d+1<c.length?(d+=1,c[d]):null};this.g
etPrevious=function(){return c[d-1]};this.setPrevious=function(a){c[d-1]=a};this
.isEmpty=function(){return 0==c.length};this.isQueueEmpty=function(){return d+1=
=c.length};this.getData=function(){return c}}(this);Mb&&(this.displayTrackingHnd
=setInterval(function(){Ga.signal(a)},
10));this.log("initDisplay")});d.register("display",B,{});var $={},H=r.core,Zb,j
,$b,pa=[],qa=[],Wa=!0;H.register("analyticszones",$,{});var $c=function(){for(va
r a={},b=0;b<arguments.length;b++){var c=arguments[b],d;for(d in c)a[d]=c[d]}ret
urn a},ac=function(a){var b;b=void 0;b={threshold:0};if(b=!(H.util.viewport.widt
h()+H.util.viewport.scrollLeft()<=a.left-b.threshold)&&!(H.util.viewport.scrollL
eft()>=a.left+a.width-b.threshold)&&!(H.util.viewport.height()+H.util.viewport.s
crollTop()<=a.top-b.threshold)&&

!(H.util.viewport.scrollTop()>=a.top+a.height-b.threshold)){var c=a.width,d=a.he
ight,e=a.top,f=a.left,l=H.util.viewport.scrollLeft(),j=H.util.viewport.scrollTop
(),p=H.util.viewport.height(),q=H.util.viewport.width(),q=l+q,p=j+p,m=0,n=m=0;e>
=j&&e+d<=p&&f>=l&&f+c<=q?m=100:e+d<j||e>p||f+c<l||f>q?m=0:(e>=j&&e+d<=p?m=d:e<j?
m=e+d-j:e<p&&(m=p-e),f>=l&&f+c<=q?n=c:f<l?n=f+c-l:f<q&&(n=q-f),m=Math.round(100*
(m*n/(d*c))));a.visiblePercentage=m}return b},dc=function(a){if(!a.customViewpor
t||!a.customViewport.id)a.customViewport.id=
"trackerZonesViewPort";if(!a.customViewport||!a.customViewport.margin)a.customVi
ewport.margin=10;var b=bc(),c=null,c=""!=a.customViewport.customStyle?document.g
etElementsByClassName(a.customViewport.customStyle):document.getElementById(a.cu
stomViewport.id);if(!c||0==c.length)c=document.getElementById(a.customViewport.i
d);c||(c=document.createElement("DIV"),c.id=a.customViewport.id,a.customViewport
.customStyle?c.className+=" "+a.customViewport.customStyle:(c.style.width=b.maxW
idth-2*a.customViewport.margin+
"px",c.style.height=b.maxHeight-2*a.customViewport.margin+"px",c.style.display="
block",c.style.position=a.customViewport.position,c.style.border="solid 1px blac
k",c.style.margin=a.customViewport.margin+"px",c.style.top=a.customViewport.top+
"px",c.style.left=a.customViewport.left+"px",c.style.backgroundColor=cc("rgba",0
.5)));return c},cc=function(a,b){var c=Math.round(16777215*Math.random());switch
(a){case "hex":return("#0"+c.toString(16)).replace(/^#0([0-9a-f]{6})$/i,"#$1");c
ase "rgb":return"rgb("+
(c>>16)+","+(c>>8&255)+","+(c&255)+")";case "rgba":return"rgba("+(c>>16)+","+(c>
>8&255)+","+(c&255)+","+b+")";default:return c}},bc=function(){return{windowWidt
h:H.util.viewport.width(),windowHeight:H.util.viewport.height(),maxHeight:Math.m
ax(Math.max(document.body.scrollHeight,document.documentElement.scrollHeight),Ma
th.max(document.body.offsetHeight,document.documentElement.offsetHeight),Math.ma
x(document.body.clientHeight,document.documentElement.clientHeight)),maxWidth:Ma
th.max(Math.max(document.body.scrollWidth,
document.documentElement.scrollWidth),Math.max(document.body.offsetWidth,documen
t.documentElement.offsetWidth),Math.max(document.body.clientWidth,document.docum
entElement.clientWidth)),screenWidth:screen.width,screenHeight:screen.height}},r
a,ec,fc,Xa=function(a){a.focus=Wa;a=$c(j,a);clearTimeout(ec);qa=[];for(var b=pa,
c=0;c<b.length;c++){var d=b[c];d.inViewport=ac(d)}for(b=0;b<pa.length;b++)c=pa[b
],c.inViewport=ac(c),c.inViewport&&c.visiblePercentage>=a.zoneVisiblePercentage&
&qa.push(c);$.log("# visible zones: "+
qa.length);b=qa;a=a||{};a={trackingzoneIds:"",timestamp:a.ts||+new Date,screenWi
dth:screen.width,currentLocationHint:self.currentLocationHint?self.currentLocati
onHint:self.currentLocationHref?self.currentLocationHref:window.location.href,fo
cus:a.focus?1:0};for(c=0;c<b.length;c++)d=b[c],a.trackingzoneIds="gridPosition"=
=j.sendZoneInfoType?a.trackingzoneIds+(d.gridPosition.toString().replace(",","-"
)+","):a.trackingzoneIds+(d.left.toString()+"-"+d.top.toString()+",");1<a.tracki
ngzoneIds.length&&(a.trackingzoneIds=
a.trackingzoneIds.substr(0,a.trackingzoneIds.length-1));$b.sendTrackingZones(a);
$.log("sent tracking zones info:"+JSON.stringify(a));ec=setTimeout(function(){Xa
({ts:+new Date})},fc)};ra={start:function(a){fc=j.statusInterval||1E4;a&&Xa({ts:
+new Date})},update:Xa};$.init=function(){$b=r.messaging;$.log("init analyticszo
nes");if(Zb){j=""==j?{statusInterval:1E4,gridType:"fixed",numColsType:"auto",num
Cols:0,zoneWidth:200,zoneHeight:200,latency:500,zoneCssClass:"wstz",zIndex:99999
,drawZonesonScreen:!0,
customViewport:{active:!1,clone:!1,id:"trackerZonesViewPort",margin:10,position:
"absolute",top:0,left:0,width:"fixed",customStyle:""}}:JSON.parse(j);"object"!=t
ypeof j&&(j=JSON.parse(j));j.gridType||(j.gridType="fixed");j.numColsType||(j.nu
mColsType="fixed");j.numCols||(j.numCols=10);j.zoneWidth||(j.zoneWidth=100);j.zo
neHeight||(j.zoneHeight=100);j.zoneCssClass||(j.zoneCssClass="wstz");j.zIndex||(
j.zIndex=-1);j.drawZonesonScreen||(j.drawZonesonScreen=!1);j.colorAlpha||(j.colo
rAlpha=0.45);j.zoneVisiblePercentage||
(j.zoneVisiblePercentage=80);j.customViewport||(j.customViewport=!1);j.latency||
(j.latency=500);latency=j.latency;pa=[];qa=[];var a,b;window.addEventListener("s
croll",function(){if(a)clearTimeout(a);else{var b=document.createEvent("CustomEv
ent");b.initCustomEvent("scrollstart",!0,!1,{});document.dispatchEvent(b)}a=setT

imeout(function(){a=null;var b=document.createEvent("CustomEvent");b.initCustomE
vent("scrollstop",!0,!1,{});document.dispatchEvent(b)},latency)});window.addEven
tListener("resize",function(){b&&
clearTimeout(b);b=setTimeout(function(){b=null;var a=document.createEvent("Custo
mEvent");a.initCustomEvent("resizestop",!0,!1,{});document.dispatchEvent(a)},lat
ency)});var c=(new Date).getTime();pa=[];qa=[];var d=bc(),e=document.body,f=docu
ment.createElement("style"),l=dc(j),n=d.screenWidth;"true"==j.customViewport.act
ive&&(n=H.util.getElementWidth(l));f.setAttribute("type","text/css");"auto"==j.n
umColsType&&(j.numCols=Math.floor(n/j.zoneWidth));var p=j.zoneWidth+("fixed"==j.
gridType?"px":"%"),q=
j.zoneHeight+("fixed"==j.gridType?"px":"%");"fixed"==j.gridType?(p=j.zoneWidth+"
px",q=j.zoneHeight+"px",e=document.body):(p=Math.floor(100/j.numCols)+"%",q=j.zo
neHeight+"px",j.customViewport&&"false"==j.customViewport.active&&(e=document.cr
eateElement("DIV")),(""==j.customViewport.customStyle||"false"==j.customViewport
.active)&&e.addClass("wsTracker"));j.customViewport&&("true"==j.customViewport.a
ctive&&"false"==j.customViewport.clone)&&(e=l);"true"==j.customViewport.clone&&(
e=l.clone(!1,!1),e.empty(),
e.addClass("cloned"));var l="fixed"==j.gridType?"absolute":"relative",m=".wsTrac
ker{width: 100% ;height: auto;margin: 0;padding: 0;overflow: hidden;background:
'transparent';position: absolute;top: 0px;left: 0px;z-index: "+j.zIndex+";max-he
ight:"+parseInt(d.maxHeight)+"px }.trackerZone{ "+("fixed"!=j.gridType?"float: l
eft; ":"")+("fixed"==j.gridType?"position: "+l+";":"")+" width: "+p+";height: "+
q+";}";f.styleSheet?f.styleSheet.cssText=m:f.appendChild(document.createTextNode
(m));document.getElementsByTagName("head")[0].appendChild(f);
for(var f=Math.floor(n/j.zoneWidth),d=Math.floor(d.maxHeight/j.zoneHeight)+1,t=m
=n=0,s=0;s<d;s++){for(var y=0;y<f;y++){var v={id:n,top:m,left:t,width:j.zoneWidt
h,height:j.zoneHeight,cssWidth:p,cssHeight:q,gridPosition:[],inViewport:!1,visib
lePercentage:0,zonePositioningStyle:l};v.gridPosition=[y,s];pa.push(v);$.log("ne
w tracking zone: "+JSON.stringify(v));t+=j.zoneWidth;n++;var A=j,B=e;if("true"==
A.drawZonesonScreen.toString().toLowerCase()){var u=document.createElement("div"
);u.id="trackerZone"+
v.id;u.setAttribute("id","trackerZone"+v.id);u.style.width=v.cssWidth;u.style.he
ight=v.cssHeight;u.style.display="block";"fixed"==A.gridType?(u.style.position=v
.zonePositioningStyle,u.style.top=v.top+"px",u.style.left=v.left+"px"):(u.style.
cssFloat=u.style.styleFloat="left",u.className+=" trackerZone");u.style.zIndex=A
.zIndex;u.style.backgroundColor=cc("rgba",A.colorAlpha);B.appendChild(u)}}m+=j.z
oneHeight;t=0}if("fixed"!=j.gridType||j.customViewport)e.parentNode||document.bo
dy.appendChild(e);e=(new Date).getTime();
$.log("tracking zones generation - processing time (ms): "+parseInt(e-c));c=func
tion(){$.log("resizing stopped");dc(j);ra.update({ts:+new Date})};document.addEv
entListener?document.addEventListener("resizestop",c):document.attachEvent&&docu
ment.attachEvent("onresizestop",c);c=function(){$.log("scroll stopped");ra.updat
e({ts:+new Date})};document.addEventListener?document.addEventListener("scrollst
op",c):document.attachEvent&&document.attachEvent("onscrollstop",c);ra.start(!0)
;$.log("started statusUpdater");
H.events.listen(H.events.eventType.focus,function(a){Wa=!0;ra.update({ts:a&&a.ti
meStamp?a.timeStamp:+new Date})});H.events.listen(H.events.eventType.blur,functi
on(a){Wa=!1;ra.update({ts:a&&a.timeStamp?a.timeStamp:+new Date})})}};Zb=H.getPar
am("tzg","trackZonesGridOn",!1,!0);j=H.getParam("zgo","zonesGridOptions","");var
Ha={},ea=r.core,gc,Aa,hc=function(){var a=function(){Ha.log("loading quantcast
frame with url: "+Aa);var a=document.createElement("iframe");a.setAttribute("sty
le","display:none;width:0px;height:0px");
a.id="wsqcast";a.async="true";a.src=Aa+(-1<Aa.indexOf("?")?"&":"?")+"cid="+encod
eURIComponent(ea.globalParameters.publisherChannelId);a.frameBorder="no";documen
t.body.appendChild(a)};!gc&&""!=ea.util.trim(Aa)&&(ea.util.executeOnPredicate(a,
function(){return document.body}),gc=!0)};Ha.init=function(){Ha.log("init")};Aa=
ea.getParam("qpu","quantcastPageUrl","");var ad=ea.getParam("qlc","quantcastload
OnOrtcConnect",!1,!0);ea.register("quantcast",Ha,{});ad?ea.events.listen(ea.even
ts.eventType.ortcConnected,
hc):hc();(function(a,b){var c={},d=a.core,e,f,j,n=function(a){eval("var ret = "+

a);return ret},p=function(a){var b,c,d,e,f,g=[],h,j,l={};this.addOper=function(a


,b){t(a,b)};var p=function(b){if(""==b)return null;var c=RegExp(a.argumentsSepar
ator+a.argumentsSeparator,"g"),b=b.replace(RegExp(a.argumentsSeparator,"g"),"\uf
ffd"),b=b.replace(c,a.argumentsSeparator);return b.split("\ufffd")},r=function(a
){for(var b=0;b<a.options.length;b++)if(a.options[b].selected)return a.options[b
].value;return null},
t=function(a,b){l[a]=b;var c;c=[];for(var d in l)c.push(d);c=c.sort(function(a,b
){return a>=b?1:-1});j.innerHTML="";for(var e=0,g=c.length;e<g;e++)d=document.cr
eateElement("option"),d.innerHTML=e+1+". "+c[e],d.value=c[e],j.appendChild(d)};t
his.exec=function(a,b){var c;if("."==a[0])switch(a.substring(1).toLowerCase()){c
ase "h":this.showHistory()}else try{"undefined"!=typeof(c=n(a))&&this.msg(c),b&&
g.push(a)}catch(d){this.msg(d,!0)}};this.exec2=function(a,b){var c;try{c=a(b),"u
ndefined"===typeof c&&
(c=""),this.msg(c)}catch(d){this.msg(d,!0)}};this.showHistory=function(){if(0==g
.length)this.msg("history empty",!0);else{h=!0;var a;a=g.slice(0>g.length-10?0:g
.length-10).reverse();for(var c="<div style='padding:2px 2px 2px 2px;width:100%;
text-align:center;font-weight:bold'>Command History:</div>",d=0;d<a.length;d++)c
+="<span style='font-weight:solid'><b>"+d+"</b> - "+a[d]+"</span></br>";var f=do
cument.createElement("div");f.setAttribute("style","border:2px solid;-moz-border
-radius:5px; border-radius:5px;padding:5px 5px 5px 5px;position:fixed;bottom:0;w
idth:300px;height:180px;color=#ff0000;background-color:#58D3F7;overflow:auto;opa
city:1;z-index:9999");
f.innerHTML=c;b.appendChild(f);var j=b,l=this;window.onkeydown=function(b){if(!h
)return!1;null==b&&(b=window.event);var c="undefined"!==typeof b.keyCode&&(null!
=b.keyCode?b.keyCode:b.which);if(!(48<=c&&57>=c||27==c))return!1;b=!1;27==c?b=!0
:(c=parseInt(String.fromCharCode(c)),c<a.length&&(e.value=a[c],b=!0));b&&(j.remo
veChild(f),l.cancelEvent());return h=!1}}};this.cancelEvent=function(){window.on
keydown=null};this.msg=function(a,b){var e=b?c:d;e.innerHTML=" "+a;setTimeout(f
unction(){e.innerHTML=
""},3E3)};this.show=function(){b.style.display="";f=!0};this.hide=function(){b.s
tyle.display="none";f=!1};this.toggle=function(){f?this.hide():this.show()};this
.clear=function(){b.innerHTML=""};var u=this,s,w;w=a.barMinimal;b=document.creat
eElement("div");b.innerHTML="<div style='vertical-align:middle;position: fixed;b
ottom:0;width: 100%;height:25px;background-color:#000000;overflow:none;opacity:1
;z-index:2147483647'></div>";s=b.lastChild;w||(w=document.createElement("button"
),w.style.fontSize="11px",
w.style.font="inherit",w.style.margin=0,w.style.verticalAlign="baseline",w.style
.display="inline",w.innerHTML="close",w.onclick=function(){u.hide()},s.appendChi
ld(w),w=document.createElement("button"),w.style.fontSize="11px",w.style.font="i
nherit",w.style.margin=0,w.style.verticalAlign="baseline",w.style.display="inlin
e",w.innerHTML="clear",w.onclick=function(){e.value="";e.focus()},s.appendChild(
w),e=document.createElement("input"),e.setAttribute("type","text"),e.style.fontS
ize="11px",e.style.font=
"inherit",e.style.margin=0,e.style.verticalAlign="baseline",e.style.display="inl
ine",e.style.width="250px",e.onkeydown=function(a){if(h)return!1;null==a&&(a=win
dow.event);switch("undefined"!==typeof a.keyCode&&(null!=a.keyCode?a.keyCode:a.w
hich)){case 13:u.exec(e.value,!0);break;case 220:"undefined"!==a.ctrlKey&&a.ctrl
Key&&u.showHistory()}return!0},s.appendChild(e),w=document.createElement("button
"),w.style.fontSize="11px",w.style.font="inherit",w.style.margin=0,w.style.verti
calAlign="baseline",w.style.display=
"inline",w.innerHTML=">",w.onclick=function(){u.exec(e.value,!0)},s.appendChild(
w));j=document.createElement("select");j.style.fontSize="11px";j.style.font="inh
erit";j.style.margin=0;j.style.verticalAlign="baseline";j.style.display="inline"
;w=a.operations.slice(0);w.sort(function(a,b){var c,d,e;for(e in a)c=e.toLowerCa
se();for(e in b)d=e.toLowerCase();return c>d?1:-1});for(var v=0;v<w.length;v++)t
(w[i]);s.appendChild(j);w=document.createElement("button");w.style.fontSize="11p
x";w.style.font="inherit";
w.style.margin=0;w.style.verticalAlign="baseline";w.style.display="inline";w.inn
erHTML=">";w.onclick=function(){u.exec2(l[r(j)],p(e?e.value:""))};s.appendChild(
w);d=document.createElement("span");d.setAttribute("style","color:#ffffff;font-s

ize:10px");s.appendChild(d);c=document.createElement("span");c.setAttribute("sty
le","color:#ff0000;font-size:10px");s.appendChild(c);a&&a.logo&&(w=document.crea
teElement("img"),w.setAttribute("style","height:20px;vertical-align:middle;float
:right;margin:4px 4px"),
w.src=a.logo,s.appendChild(w));b.appendChild(s);document.body&&document.body.app
endChild(b);this.hide()};c.init=function(){f&&d.util.executeOnPredicate(function
(){var a=d.getParam("itp","instrumentationTriggerPosition",4),b=d.getParam("ito"
,"instrumentationVisibleOn",!1,!0),a=parseInt(a,10);if(1>a||4<a)a=4;e=new p({ope
rations:[],argumentsSeparator:";",barMinimal:j});b&&e.show();b=document.createEl
ement("div");b.setAttribute("id","ws_inst_trigger");b.onclick=function(a){a=a||w
indow.event;null!=a&&
a.shiftKey&&e.toggle()};b.setAttribute("style",["top:0","top:0;right:0","bottom:
0;right:0","bottom:0"][a-1]+";padding:5px;position:fixed;width:5px;height:5px;ba
ckground-color:#ff0000;opacity:0.0;filter: alpha(opacity = 0);z-index:2147483647
");document.body&&document.body.appendChild(b);d.events.emit("instrumentationLoa
ded")},function(){return document.body});c.log("init instrumentation")};f=d.getP
aram("sio","scriptInstrumentationOn",!0,!0);j=d.getParam("ibm","instrumentationB
arMinimal",!1,!0);c.addOper=
function(a,b){e&&e.addOper(a,b)};d.register(b,c,{})})(r,"instrumentation");var Y
a=r.core,bd="undefined"==typeof window.WS_INIT?!0:window.WS_INIT,Za=function(){b
d&&Ya.init()};Ya.InitOnLoad&&(Ya.InitOnPageLoad?window.addEventListener?window.a
ddEventListener("load",Za,!1):window.attachEvent&&window.attachEvent("onload",Za
):Za())})();
if(!window.__twttrlr){(function(a,b){function s(a){for(var b=1,c;c=arguments[b];
b++)for(var d in c)a[d]=c[d];return a}function t(a){return Array.prototype.slice
.call(a)}function v(a,b){for(var c=0,d;d=a[c];c++)if(b==d)return c;return-1}func
tion w(){var a=t(arguments),b=[];for(var c=0,d=a.length;c<d;c++)a[c].length>0&&b
.push(a[c].replace(/\/$/,""));return b.join("/")}function x(a,b,c){var d=b.split
("/"),e=a;while(d.length>1){var f=d.shift();e=e[f]=e[f]||{}}e[d[0]]=c}function y
(){}function z(a,b){this.id=this.path=a,this.force=!!b}function A(a,b){this.id=a
,this.body=b,typeof b=="undefined"&&(this.path=this.resolvePath(a))}function B(a
,b){this.deps=a,this.collectResults=b,this.deps.length==0&&this.complete()}funct
ion C(a,b){this.deps=a,this.collectResults=b}function D(){for(var a in d)if(d[a]
.readyState=="interactive")return l[d[a].id]}function E(a,b){var d;return!a&&c&&
(d=k||D()),d?(delete l[d.scriptId],d.body=b,d.execute()):(j=d=new A(a,b),i[d.id]
=d),d}function F(){var a=t(arguments),b,c;return typeof a[0]=="string"&&(b=a.shi
ft()),c=a.shift(),E(b,c)}function G(a,b){var c=b.id||"",d=c.split("/");d.pop();v
ar e=d.join("/");return a.replace(/^\./,e)}function H(a,b){function d(a){return
A.exports[G(a,b)]}var c=[];for(var e=0,f=a.length;e<f;e++){if(a[e]=="require"){c
.push(d);continue}if(a[e]=="exports"){b.exports=b.exports||{},c.push(b.exports);
continue}c.push(d(a[e]))}return c}function I(){var a=t(arguments),b=[],c,d;retur
n typeof a[0]=="string"&&(c=a.shift()),u(a[0])&&(b=a.shift()),d=a.shift(),E(c,fu
nction(a){function f(){var e=H(t(b),c),f;typeof d=="function"?f=d.apply(c,e):f=d
,typeof f=="undefined"&&(f=c.exports),a(f)}var c=this,e=[];for(var g=0,h=b.lengt
h;g<h;g++){var i=b[g];v(["require","exports"],i)==-1&&e.push(G(i,c))}e.length>0?
J.apply(this,e.concat(f)):f()})}function J(){var a=t(arguments),b,c;typeof a[a.l
ength-1]=="function"&&(b=a.pop()),typeof a[a.length-1]=="boolean"&&(c=a.pop());v
ar d=new B(K(a,c),c);return b&&d.then(b),d}function K(a,b){var c=[];for(var d=0,
e;e=a[d];d++)typeof e=="string"&&(e=L(e)),u(e)&&(e=new C(K(e,b),b)),c.push(e);re
turn c}function L(a){var b,c;for(var d=0,e;e=J.matchers[d];d++){var f=e[0],g=e[1
];if(b=a.match(f))return g(a)}throw new Error(a+" was not recognised by loader")
}function N(){return a.using=m,a.provide=n,a.define=o,a.loadrunner=p,M}function
O(a){for(var b=0;b<J.bundles.length;b++)for(var c in J.bundles[b])if(c!=a&&v(J.b
undles[b][c],a)>-1)return c}var c=a.attachEvent&&!a.opera,d=b.getElementsByTagNa
me("script"),e=0,f,g=b.createElement("script"),h={},i={},j,k,l={},m=a.using,n=a.
provide,o=a.define,p=a.loadrunner;for(var q=0,r;r=d[q];q++)if(r.src.match(/loadr
unner\.js(\?|#|$)/)){f=r;break}var u=Array.isArray||function(a){return a.constru
ctor==Array};y.prototype.then=function(b){var c=this;return this.started||(this.
started=!0,this.start()),this.completed?b.apply(a,this.results):(this.callbacks=
this.callbacks||[],this.callbacks.push(b)),this},y.prototype.start=function(){},

y.prototype.complete=function(){if(!this.completed){this.results=t(arguments),th
is.completed=!0;if(this.callbacks)for(var b=0,c;c=this.callbacks[b];b++)c.apply(
a,this.results)}},z.loaded=[],z.prototype=new y,z.prototype.start=function(){var
a=this,b,c,d;return(d=i[this.id])?(d.then(function(){a.complete()}),this):((b=h
[this.id])?b.then(function(){a.loaded()}):!this.force&&v(z.loaded,this.id)>-1?th
is.loaded():(c=O(this.id))?J(c,function(){a.loaded()}):this.load(),this)},z.prot
otype.load=function(){var b=this;h[this.id]=b;var c=g.cloneNode(!1);this.scriptI
d=c.id="LR"+ ++e,c.type="text/javascript",c.async=!0,c.onerror=function(){throw
new Error(b.path+" not loaded")},c.onreadystatechange=c.onload=function(c){c=a.e
vent||c;if(c.type=="load"||v(["loaded","complete"],this.readyState)>-1)this.onre
adystatechange=null,b.loaded()},c.src=this.path,k=this,d[0].parentNode.insertBef
ore(c,d[0]),k=null,l[c.id]=this},z.prototype.loaded=function(){this.complete()},
z.prototype.complete=function(){v(z.loaded,this.id)==-1&&z.loaded.push(this.id),
delete h[this.id],y.prototype.complete.apply(this,arguments)},A.exports={},A.pro
totype=new z,A.prototype.resolvePath=function(a){return w(J.path,a+".js")},A.pro
totype.start=function(){var a,b,c=this,d;this.body?this.execute():(a=A.exports[t
his.id])?this.exp(a):(b=i[this.id])?b.then(function(a){c.exp(a)}):(bundle=O(this
.id))?J(bundle,function(){c.start()}):(i[this.id]=this,this.load())},A.prototype
.loaded=function(){var a,b,d=this;c?(b=A.exports[this.id])?this.exp(b):(a=i[this
.id])&&a.then(function(a){d.exp(a)}):(a=j,j=null,a.id=a.id||this.id,a.then(funct
ion(a){d.exp(a)}))},A.prototype.complete=function(){delete i[this.id],z.prototyp
e.complete.apply(this,arguments)},A.prototype.execute=function(){var a=this;type
of this.body=="object"?this.exp(this.body):typeof this.body=="function"&&this.bo
dy.apply(window,[function(b){a.exp(b)}])},A.prototype.exp=function(a){this.compl
ete(this.exports=A.exports[this.id]=a||{})},B.prototype=new y,B.prototype.start=
function(){function b(){var b=[];a.collectResults&&(b[0]={});for(var c=0,d;d=a.d
eps[c];c++){if(!d.completed)return;d.results.length>0&&(a.collectResults?d insta
nceof C?s(b[0],d.results[0]):x(b[0],d.id,d.results[0]):b=b.concat(d.results))}a.
complete.apply(a,b)}var a=this;for(var c=0,d;d=this.deps[c];c++)d.then(b);return
this},C.prototype=new y,C.prototype.start=function(){var a=this,b=0,c=[];return
a.collectResults&&(c[0]={}),function d(){var e=a.deps[b++];e?e.then(function(b)
{e.results.length>0&&(a.collectResults?e instanceof C?s(c[0],e.results[0]):x(c[0
],e.id,e.results[0]):c.push(e.results[0])),d()}):a.complete.apply(a,c)}(),this},
I.amd={};var M=function(a){return a(J,F,M,define)};M.Script=z,M.Module=A,M.Colle
ction=B,M.Sequence=C,M.Dependency=y,M.noConflict=N,a.loadrunner=M,a.using=J,a.pr
ovide=F,a.define=I,J.path="",J.matchers=[],J.matchers.add=function(a,b){this.uns
hift([a,b])},J.matchers.add(/(^script!|\.js$)/,function(a){var b=new z(a.replace
(/^\$/,J.path.replace(/\/$/,"")+"/").replace(/^script!/,""),!1);return b.id=a,b}
),J.matchers.add(/^[a-zA-Z0-9_\-\/]+$/,function(a){return new A(a)}),J.bundles=[
],f&&(J.path=f.getAttribute("data-path")||f.src.split(/loadrunner\.js/)[0]||"",(
main=f.getAttribute("data-main"))&&J.apply(a,main.split(/\s*,\s*/)).then(functio
n(){}))})(this,document);(window.__twttrlr = loadrunner.noConflict());}__twttrlr
(function(using, provide, loadrunner, define) {provide("util/util",function(a){f
unction b(a){var b=1,c,d;for(;c=arguments[b];b++)for(d in c)if(!c.hasOwnProperty
||c.hasOwnProperty(d))a[d]=c[d];return a}function c(a){for(var b in a)a.hasOwnPr
operty(b)&&!a[b]&&a[b]!==!1&&a[b]!==0&&delete a[b]}function d(a,b){var c=0,d;for
(;d=a[c];c++)if(b==d)return c;return-1}function e(a,b){if(!a)return null;if(a.fi
lter)return a.filter.apply(a,[b]);if(!b)return a;var c=[],d=0,e;for(;e=a[d];d++)
b(e)&&c.push(e);return c}function f(a,b){if(!a)return null;if(a.map)return a.map
.apply(a,[b]);if(!b)return a;var c=[],d=0,e;for(;e=a[d];d++)c.push(b(e));return
c}function g(a){return a&&a.replace(/(^\s+|\s+$)/g,"")}function h(a){return{}.to
String.call(a).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function i(a){return a&&S
tring(a).toLowerCase().indexOf("[native code]")>-1}function j(a,b){if(a.contains
)return a.contains(b);var c=b.parentNode;while(c){if(c===a)return!0;c=c.parentNo
de}return!1}function k(a){return a===Object(a)}a({aug:b,compact:c,containsElemen
t:j,filter:e,map:f,trim:g,indexOf:d,isNative:i,isObject:k,toType:h})});
provide("util/events",function(a){using("util/util",function(b){function d(){thi
s.completed=!1,this.callbacks=[]}var c={bind:function(a,b){return this._handlers
=this._handlers||{},this._handlers[a]=this._handlers[a]||[],this._handlers[a].pu
sh(b)},unbind:function(a,c){if(!this._handlers[a])return;if(c){var d=b.indexOf(t

his._handlers[a],c);d>=0&&this._handlers[a].splice(d,1)}else this._handlers[a]=[
]},trigger:function(a,b){var c=this._handlers&&this._handlers[a];b.type=a;if(c)f
or(var d=0,e;e=c[d];d++)e.call(this,b)}};d.prototype.addCallback=function(a){thi
s.completed?a.apply(this,this.results):this.callbacks.push(a)},d.prototype.compl
ete=function(){this.results=makeArray(arguments),this.completed=!0;for(var a=0,b
;b=this.callbacks[a];a++)b.apply(this,this.results)},a({Emitter:c,Promise:d})})}
);
provide("tfw/util/globals",function(a){function c(){var a=document.getElementsBy
TagName("meta"),c,d,e=0;for(;c=a[e];e++){if(!/^twitter:/.test(c.name))continue;d
=c.name.replace(/^twitter:/,""),b[d]=c.content}}function d(a){return b[a]}var b=
{};a({init:c,val:d})});
provide("util/querystring",function(a){function b(a){return encodeURIComponent(a
).replace(/\+/g,"%2B")}function c(a){return decodeURIComponent(a)}function d(a){
var c=[],d;for(d in a)a[d]!==null&&typeof a[d]!="undefined"&&c.push(b(d)+"="+b(a
[d]));return c.sort().join("&")}function e(a){var b={},d,e,f,g;if(a){d=a.split("
&");for(g=0;f=d[g];g++)e=f.split("="),e.length==2&&(b[c(e[0])]=c(e[1]))}return b
}function f(a,b){var c=d(b);return c.length>0?a.indexOf("?")>=0?a+"&"+d(b):a+"?"
+d(b):a}function g(a){var b=a&&a.split("?");return b.length==2?e(b[1]):{}}a({url
:f,decodeURL:g,decode:e,encode:d,encodePart:b,decodePart:c})});
provide("util/twitter",function(a){using("util/querystring",function(b){function
f(a){return typeof a=="string"&&c.test(a)&&RegExp.$1.length<=20}function g(a){r
eturn f(a)&&RegExp.$1}function h(a){var c=b.decodeURL(a);c.screen_name=g(a);if(c
.screen_name)return b.url("https://twitter.com/intent/user",c)}function i(a){ret
urn typeof a=="string"&&!/\W/.test(a)}function j(a){return i(a)?"#"+a:""}functio
n k(a){return typeof a=="string"&&d.test(a)}function l(a){return k(a)&&RegExp.$1
}function m(a){return e.test(a)}var c=/(?:^|(?:https?\:)?\/\/(?:www\.)?twitter\.
com(?:\:\d+)?(?:\/intent\/(?:follow|user)\/?\?screen_name=|(?:\/#!)?\/))@?([\w]+
)(?:\?|&|$)/i,d=/(?:^|(?:https?\:)?\/\/(?:www\.)?twitter\.com(?:\:\d+)?\/(?:#!\/
)?[\w_]+\/status(?:es)?\/)(\d+)/i,e=/^http(s?):\/\/((www\.)?)twitter.com\//;a({i
sHashTag:i,hashTag:j,isScreenName:f,screenName:g,isStatus:k,status:l,intentForPr
ofileURL:h,isTwitterURL:m,regexen:{profile:c}})})});
provide("util/uri",function(a){using("util/querystring","util/util","util/twitte
r",function(b,c,d){function e(a){var b;return a.match(/^https?:\/\//)?a:(b=locat
ion.host,location.port.length>0&&(b+=":"+location.port),[location.protocol,"//",
b,a].join(""))}function f(){var a=document.getElementsByTagName("link");for(var
b=0,c;c=a[b];b++)if(c.rel=="canonical")return e(c.href);return null}function g()
{var a=document.getElementsByTagName("a"),b=document.getElementsByTagName("link"
),c=[a,b],e,f,g=0,h=0,i=/\bme\b/,j;for(;e=c[g];g++)for(h=0;f=e[h];h++)if(i.test(
f.rel)&&(j=d.screenName(f.href)))return j}a({absolutize:e,getCanonicalURL:f,getS
creenNameFromPage:g})})});
provide("util/iframe",function(a){a(function(a){var b=(a.replace&&a.replace.owne
rDocument||document).createElement("div"),c,d,e;b.innerHTML="<iframe allowtransp
arency='true' frameBorder='0' scrolling='no'></iframe>",c=b.firstChild,c.src=a.u
rl,c.className=a.className||"";if(a.css)for(d in a.css)a.css.hasOwnProperty(d)&&
(c.style[d]=a.css[d]);if(a.attributes)for(e in a.attributes)a.attributes.hasOwnP
roperty(e)&&c.setAttribute(e,a.attributes[e]);return a.replace?a.replace.parentN
ode.replaceChild(c,a.replace):a.insertTarget&&a.insertTarget.appendChild(c),c})}
);
provide("dom/get",function(a){using("util/util",function(b){function c(a,c,d,e){
var f,g,h=[],i,j,k,l,m,n;c=c||document;if(b.isNative(c.getElementsByClassName))r
eturn h=b.filter(c.getElementsByClassName(a),function(a){return!d||a.tagName.toL
owerCase()==d.toLowerCase()}),[].slice.call(h,0,e||h.length);i=a.split(" "),l=i.
length,f=c.getElementsByTagName(d||"*"),n=f.length;for(k=0;k<l&&n>0;k++){h=[],j=
i[k];for(m=0;m<n;m++){g=f[m],~b.indexOf(g.className.split(" "),j)&&h.push(g);if(
k+1==l&&h.length===e)break}f=h,n=f.length}return h}function d(a,b,d){return c(a,
b,d,1)[0]}function e(a,c,d){var f=c&&c.parentNode,g;if(!f||f===d)return;return f
.tagName==a?f:(g=f.className.split(" "),0===a.indexOf(".")&&~b.indexOf(g,a.slice
(1))?f:e(a,f,d))}a({all:c,one:d,ancestor:e})})});
provide("util/domready",function(a){function k(){b=1;for(var a=0,d=c.length;a<d;
a++)c[a]()}var b=0,c=[],d,e,f=!1,g=document.createElement("a"),h="DOMContentLoad

ed",i="addEventListener",j="onreadystatechange";/^loade|c/.test(document.readySt
ate)&&(b=1),document[i]&&document[i](h,e=function(){document.removeEventListener
(h,e,f),k()},f),g.doScroll&&document.attachEvent(j,d=function(){/^c/.test(docume
nt.readyState)&&(document.detachEvent(j,d),k())});var l=g.doScroll?function(a){s
elf!=top?b?a():c.push(a):!function(){try{g.doScroll("left")}catch(b){return setT
imeout(function(){l(a)},50)}a()}()}:function(a){b?a():c.push(a)};a(l)});
provide("tfw/widget/base",function(a){using("util/util","util/domready","dom/get
","util/querystring","util/iframe",function(b,c,d,e,f){function m(a){var b;if(!a
)return;a.ownerDocument?(this.srcEl=a,this.classAttr=a.className.split(" ")):(th
is.srcOb=a,this.classAttr=[]),b=this.params(),this.id=o(),this.setLanguage(),thi
s.related=b.related||this.dataAttr("related"),this.partner=b.partner||this.dataA
ttr("partner"),this.dnt=b.dnt||this.dataAttr("dnt")||"",this.styleAttr=[],this.t
argetEl=a.targetEl}function n(){var a=0,b;for(;b=k[a];a++)b.call()}function o(){
return this.srcEl&&this.srcEl.id||"twitter-widget-"+g++}function p(a){if(!a)retu
rn;return a.lang?a.lang:p(a.parentNode)}var g=0,h,i,j={list:[],byId:{}},k=[],l={
ar:{"%{followers_count} followers":" %{followers_count}","100K+":"+1
" ",M:" ",Tweet:" ","Tweet %{hashtag}":" %{hashtag}","Tweet
ere","100K+":"100K+","10k unit":"10k enhed",Follow:"Flg","Follow %{screen_name}":"
Flg %{screen_name}",K:"K",M:"M",Tweet:"Tweet","Tweet %{hashtag}":"Tweet %{hashtag}
","Tweet to %{name}":"Tweet til %{name}","Twitter Stream":"Twitter-strm"},de:{"%{f
ollowers_count} followers":"%{followers_count} Follower","100K+":"100Tsd+","10k
unit":"10tsd-Einheit",Follow:"Folgen","Follow %{screen_name}":"%{screen_name} fo
lgen",K:"Tsd",M:"M",Tweet:"Twittern","Tweet %{hashtag}":"Tweet %{hashtag}","Twee
t to %{name}":"Tweet an %{name}","Twitter Stream":"Twitter Stream"},es:{"%{follo
wers_count} followers":"%{followers_count} seguidores","100K+":"100K+","10k unit
":"10k unidad",Follow:"Seguir","Follow %{screen_name}":"Seguir a %{screen_name}"
,K:"K",M:"M",Tweet:"Twittear","Tweet %{hashtag}":"Twittear %{hashtag}","Tweet to
%{name}":"Twittear a %{name}","Twitter Stream":"Cronologa de Twitter"},fa:{"%{fol
lowers_count} followers":"%{followers_count} ","100K+":">
"%{followers_count} seuraajaa","100K+":"100 000+","10k unit":"10 000 yksikk",Follow:
"Seuraa","Follow %{screen_name}":"Seuraa kyttj %{screen_name}",K:"tuhatta",M:"milj.",
et:"Twiittaa","Tweet %{hashtag}":"Twiittaa %{hashtag}","Tweet to %{name}":"Twiit
taa kyttjlle %{name}","Twitter Stream":"Twitter-virta"},fil:{"%{followers_count} follo
wers":"%{followers_count} mga tagasunod","100K+":"100K+","10k unit":"10k yunit",
Follow:"Sundan","Follow %{screen_name}":"Sundan si %{screen_name}",K:"K",M:"M",T
weet:"I-tweet","Tweet %{hashtag}":"I-tweet ang %{hashtag}","Tweet to %{name}":"M
ag-Tweet kay %{name}","Twitter Stream":"Stream ng Twitter"},fr:{"%{followers_cou
nt} followers":"%{followers_count} abonns","100K+":"100K+","10k unit":"unit de 10k",
Follow:"Suivre","Follow %{screen_name}":"Suivre %{screen_name}",K:"K",M:"M",Twee
t:"Tweeter","Tweet %{hashtag}":"Tweeter %{hashtag}","Tweet to %{name}":"Tweeter %
{name}","Twitter Stream":"Flux Twitter"},he:{"%{followers_count} followers":"%{f
ollowers_count} ","100K+":" ","10k unit":"
llowers":"%{followers_count} ","100K+":"1 +","10k unit":"
low %{screen_name}":"%{screen_name} kvetse",K:"E",M:"M",Tweet:"Tweet","Tweet %{hasht
ag}":"%{hashtag} tweetelse","Tweet to %{name}":"Tweet kldse neki: %{name}","Twitter St
ream":"Twitter Hrfolyam"},id:{"%{followers_count} followers":"%{followers_count} p
engikut","100K+":"100 ribu+","10k unit":"10 ribu unit",Follow:"Ikuti","Follow %{
screen_name}":"Ikuti %{screen_name}",K:"&nbsp;ribu",M:"&nbsp;juta",Tweet:"Tweet"
,"Tweet %{hashtag}":"Tweet %{hashtag}","Tweet to %{name}":"Tweet ke %{name}","Tw
itter Stream":"Aliran Twitter"},it:{"%{followers_count} followers":"%{followers_
count} follower","100K+":"100K+","10k unit":"10k unit",Follow:"Segui","Follow %{sc
reen_name}":"Segui %{screen_name}",K:"K",M:"M",Tweet:"Tweet","Tweet %{hashtag}":
"Twitta %{hashtag}","Tweet to %{name}":"Twitta a %{name}","Twitter Stream":"Twit
ter Stream"},ja:{"%{followers_count} followers":"%{followers_count} ","10
e}":"%{screen_name} ",K:"K",M:"M",Tweet:" ","Tweet %{hashtag}"
ers_count} ","100K+":"100 ","10k unit":" ",Follow:"
name} ","Twitter Stream":" "},msa:{"%{followers_count}
k unit":"10 ribu unit",Follow:"Ikut","Follow %{screen_name}":"Ikut %{screen_name
}",K:"ribu",M:"juta",Tweet:"Tweet","Tweet %{hashtag}":"Tweet %{hashtag}","Tweet
to %{name}":"Tweet kepada %{name}","Twitter Stream":"Strim Twitter"},nl:{"%{foll

owers_count} followers":"%{followers_count} volgers","100K+":"100k+","10k unit":


"10k-eenheid",Follow:"Volgen","Follow %{screen_name}":"%{screen_name} volgen",K:
"k",M:" mln.",Tweet:"Tweeten","Tweet %{hashtag}":"%{hashtag} tweeten","Tweet to
%{name}":"Tweeten naar %{name}","Twitter Stream":"Twitter Stream"},no:{"%{follow
ers_count} followers":"%{followers_count} flgere","100K+":"100K+","10k unit":"10k
",Follow:"Flg","Follow %{screen_name}":"Flg %{screen_name}",K:"K",M:"M",Tweet:"Tweet
","Tweet %{hashtag}":"Tweet %{hashtag}","Tweet to %{name}":"Send tweet til %{nam
e}","Twitter Stream":"Twitter-strm"},pl:{"%{followers_count} followers":"%{followe
rs_count} obserwuj cych","100K+":"100 tys.+","10k unit":"10 tys.",Follow:"Obserwuj"
,"Follow %{screen_name}":"Obserwuj %{screen_name}",K:"tys.",M:"mln",Tweet:"Tweet
nij","Tweet %{hashtag}":"Tweetnij %{hashtag}","Tweet to %{name}":"Tweetnij do %{
name}","Twitter Stream":"Strumie Twittera"},pt:{"%{followers_count} followers":"%{
followers_count} seguidores","100K+":"+100 mil","10k unit":"10 mil unidades",Fol
low:"Seguir","Follow %{screen_name}":"Seguir %{screen_name}",K:"Mil",M:"M",Tweet
:"Tweetar","Tweet %{hashtag}":"Tweetar %{hashtag}","Tweet to %{name}":"Tweetar p
ara %{name}","Twitter Stream":"Transmisses do Twitter"},ru:{"%{followers_count} fo
llowers":" : %{followers_count} ","100K+":"100 .+","10k unit":"
et to %{name}":" %{name}","Twitter Stream":" "},
","10k unit":"10k",Follow:"Flj","Follow %{screen_name}":"Flj %{screen_name}",K:"K",M
:"M",Tweet:"Tweeta","Tweet %{hashtag}":"Tweeta %{hashtag}","Tweet to %{name}":"T
weeta till %{name}","Twitter Stream":"Twitterflde"},th:{"%{followers_count} follow
ers":"%{followers_count} ","100K+":"100 +","10k unit":"
+100 bin","10k unit":"10 bin birim",Follow:"Takip et","Follow %{screen_name}":"T
akip et: %{screen_name}",K:"bin",M:"milyon",Tweet:"Tweetle","Tweet %{hashtag}":"
Tweetle: %{hashtag}","Tweet to %{name}":"Tweetle: %{name}","Twitter Stream":"Twi
tter Ak "},ur:{"%{followers_count} followers":"%{followers_count} ","100K+":
me} ","Twitter Stream":" "},"zh-cn":{"%{followers_c
_name}":" %{screen_name}",K:" ",M:" ",Tweet:" ","Tweet %{hashtag}":" %{h
tream":"Twitter "},"zh-tw":{"%{followers_count} followers":"%{followers_count}
screen_name}":" %{screen_name}",K:" ",M:" ",Tweet:" ","Tweet %{hashtag}":"
aug(m.prototype,{setLanguage:function(a){var b;a||(a=this.params().lang||this.da
taAttr("lang")||p(this.srcEl)),a=a&&a.toLowerCase();if(!a)return this.lang="en";
if(l[a])return this.lang=a;b=a.replace(/[\-_].*/,"");if(l[b])return this.lang=b;
this.lang="en"},_:function(a,b){var c=this.lang;b=b||{};if(!c||!l.hasOwnProperty
(c))c=this.lang="en";return a=l[c]&&l[c][a]||a,this.ringo(a,b,/%\{([\w_]+)\}/g)}
,ringo:function(a,b,c){return c=c||/\{\{([\w_]+)\}\}/g,a.replace(c,function(a,c)
{return b[c]!==undefined?b[c]:a})},add:function(a){j.list.push(this),j.byId[this
.id]=a},create:function(a,b,c){return c["data-twttr-rendered"]=!0,f({url:a,css:b
,className:this.classAttr.join(" "),id:this.id,attributes:c,replace:this.srcEl,i
nsertTarget:this.targetEl})},params:function(){var a,b;return this.srcOb?b=this.
srcOb:(a=this.srcEl&&this.srcEl.href&&this.srcEl.href.split("?")[1],b=a?e.decode
(a):{}),this.params=function(){return b},b},dataAttr:function(a){return this.src
El&&this.srcEl.getAttribute("data-"+a)},attr:function(a){return this.srcEl&&this
.srcEl.getAttribute(a)},styles:{base:[["font","normal normal normal 11px/18px 'H
elvetica Neue', Arial, sans-serif"],["margin","0"],["padding","0"],["whiteSpace"
,"nowrap"]],button:[["fontWeight","bold"],["textShadow","0 1px 0 rgba(255,255,25
5,.5)"]],large:[["fontSize","13px"],["lineHeight","26px"]],vbubble:[["fontSize",
"16px"]]},width:function(){throw new Error(name+" not implemented")},height:func
tion(){return this.size=="m"?20:28},minWidth:function(){},maxWidth:function(){},
minHeight:function(){},maxHeight:function(){},dimensions:function(){function a(a
){switch(typeof a){case"string":return a;case"undefined":return;default:return a
+"px"}}var b,c={width:this.width(),height:this.height()};this.minWidth()&&(c["mi
n-width"]=this.minWidth()),this.maxWidth()&&(c["max-width"]=this.maxWidth()),thi
s.minHeight()&&(c["min-height"]=this.minHeight()),this.maxHeight()&&(c["max-heig
ht"]=this.maxHeight());for(b in c)c[b]=a(c[b]);return c},generateId:o}),m.afterL
oad=function(a){k.push(a)},m.init=function(a){i=a},m.find=function(a){return a&&
j.byId[a]?j.byId[a].element:null},m.embed=function(a){var b=i.widgets,c,e,f,g,h,
k;a=a||document;for(f in b){f.match(/\./)?(g=f.split("."),c=d.all(g[1],a,g[0])):
c=a.getElementsByTagName(f);for(h=0;k=c[h];h++){if(k.getAttribute("data-twttr-re
ndered"))continue;k.setAttribute("data-twttr-rendered","true"),e=new b[f](k),j.l

ist.push(e),j.byId[e.id]=e,e.render(i)}}n()},a(m)})});
provide("tfw/widget/intent",function(a){using("tfw/widget/base","util/util","uti
l/querystring","util/uri",function(b,c,d,e){function m(a){var b=Math.round(k/2-h
/2),c=0;j>i&&(c=Math.round(j/2-i/2)),window.open(a,undefined,[g,"width="+h,"heig
ht="+i,"left="+b,"top="+c].join(","))}function n(a,b){using("tfw/hub/client",fun
ction(c){c.openIntent(a,b)})}function o(a){var b="original_referer="+location.hr
ef;return[a,b].join(a.indexOf("?")==-1?"?":"&")}function p(a){var b,d,e,g;a=a||w
indow.event,b=a.target||a.srcElement;if(a.altKey||a.metaKey||a.shiftKey)return;w
hile(b){if(~c.indexOf(["A","AREA"],b.nodeName))break;b=b.parentNode}b&&b.href&&(
d=b.href.match(f),d&&(g=o(b.href),g=g.replace(/^http[:]/,"https:"),g=g.replace(/
^\/\//,"https://"),q(g,b),a.returnValue=!1,a.preventDefault&&a.preventDefault())
)}function q(a,b){if(twttr.events.hub&&b){var c=new r(l.generateId(),b);l.add(c)
,n(a,b),twttr.events.trigger("click",{target:b,region:"intent",type:"click",data
:{}})}else m(a)}function r(a,b){this.id=a,this.element=this.srcEl=b}function s(a
){this.srcEl=[],this.element=a}var f=/twitter\.com(\:\d{2,4})?\/intent\/(\w+)/,g
="scrollbars=yes,resizable=yes,toolbar=no,location=yes",h=550,i=520,j=screen.hei
ght,k=screen.width,l;s.prototype=new b,c.aug(s.prototype,{render:function(a){l=t
his,window.__twitterIntentHandler||(document.addEventListener?document.addEventL
istener("click",p,!1):document.attachEvent&&document.attachEvent("onclick",p),wi
ndow.__twitterIntentHandler=!0)}}),s.open=q,a(s)})});
provide("dom/classname",function(a){function b(a,b){a.classList?a.classList.add(
b):f(b).test(a.className)||(a.className+=" "+b)}function c(a,b){a.classList?a.cl
assList.remove(b):a.className=a.className.replace(f(b)," ")}function d(a,d,g){a.
classList&&e(a,d)?(c(a,d),b(a,g)):a.className=a.className.replace(f(d),g)}functi
on e(a,b){return a.classList?a.classList.contains(b):f(b).test(a.className)}func
tion f(a){return new RegExp("\\b"+a+"\\b","g")}a({add:b,remove:c,replace:d,prese
nt:e})});
provide("util/env",function(a){var b=window.navigator.userAgent;a({retina:functi
on(){return(window.devicePixelRatio||1)>1},anyIE:function(){return/MSIE \d/.test
(b)},ie6:function(){return/MSIE 6/.test(b)},ie7:function(){return/MSIE 7/.test(b
)},cspEnabledIE:function(){return/MSIE 1\d/.test(b)},touch:function(){return"ont
ouchstart"in window||/Opera Mini/.test(b)||navigator.msMaxTouchPoints>0},cssTran
sitions:function(){var a=document.body.style;return a.transition!==undefined||a.
webkitTransition!==undefined||a.mozTransition!==undefined||a.oTransition!==undef
ined||a.msTransition!==undefined}})});
provide("dom/delegate",function(a){using("util/env",function(b){function e(a){va
r b=a.getAttribute("data-twitter-event-id");return b?b:(a.setAttribute("data-twi
tter-event-id",++d),d)}function f(a,b,c){var d=0,e=a&&a.length||0;for(d=0;d<e;d+
+)a[d].call(b,c)}function g(a,b,c){var d=c||a.target||a.srcElement,e=d.className
.split(" "),h=0,i,j=e.length;for(;h<j;h++)f(b["."+e[h]],d,a);f(b[d.tagName],d,a)
;if(a.cease)return;d!==this&&g.call(this,a,b,d.parentElement||d.parentNode)}func
tion h(a,b,c){if(a.addEventListener){a.addEventListener(b,function(d){g.call(a,d
,c[b])},!1);return}a.attachEvent&&a.attachEvent("on"+b,function(){g.call(a,a.own
erDocument.parentWindow.event,c[b])})}function i(a,b,d,f){var g=e(a);c[g]=c[g]||
{},c[g][b]||(c[g][b]={},h(a,b,c[g])),c[g][b][d]=c[g][b][d]||[],c[g][b][d].push(f
)}function j(a,b,d){var f=e(b),h=c[f]&&c[f];g.call(b,{target:d},h[a])}function k
(a){return m(a),l(a),!1}function l(a){a&&a.preventDefault?a.preventDefault():a.r
eturnValue=!1}function m(a){a&&(a.cease=!0)&&a.stopPropagation?a.stopPropagation
():a.cancelBubble=!0}var c={},d=-1;a({stop:k,stopPropagation:m,preventDefault:l,
delegate:i,simulate:j})})});
provide("util/throttle",function(a){function b(a,b,c){function g(){var c=+(new D
ate);window.clearTimeout(f);if(c-e>b){e=c,a.call(d);return}f=window.setTimeout(g
,b)}var d=c||this,e=0,f;return g}a(b)});
provide("util/insert",function(a){a(function(a,b){if(b){if(!b.parentNode)return
b;b.parentNode.replaceChild(a,b),delete b}else document.body.insertBefore(a,docu
ment.body.firstChild);return a})});
provide("util/datetime",function(a){using("util/util",function(b){function n(a){
var e=a||"",h=e.toString(),i,j;return i=function(){var a;if(f.test(h))return par
seInt(h,10);if(a=h.match(d))return Date.UTC(a[7],b.indexOf(g,a[1]),a[2],a[3],a[4
],a[5]);if(a=h.match(c))return Date.UTC(a[1],a[2]-1,a[3],a[4],a[5],a[6])}(),i?(j

=new Date(i),!isNaN(j.getTime())&&j):!1}function o(a,b){function q(a,b){return p


&&p[a]&&(a=p[a]),a.replace(/%\{([\w_]+)\}/g,function(a,c){return b[c]!==undefine
d?b[c]:a})}var c=n(a),d=+(new Date),e=d-c,f,l=b&&b.months||g,o=b&&b.formats||{ab
br:"%{number}%{symbol}",shortdate:"%{day} %{month}",longdate:"%{day} %{month} %{
year}"},p=b&&b.phrases;return c?isNaN(e)||e<h*2?q("now"):e<i?(f=Math.floor(e/h),
q(o.abbr,{number:f,symbol:q(m,{abbr:q("s"),expanded:f>1?q("seconds"):q("second")
})})):e<j?(f=Math.floor(e/i),q(o.abbr,{number:f,symbol:q(m,{abbr:q("m"),expanded
:f>1?q("minutes"):q("minute")})})):e<k?(f=Math.floor(e/j),q(o.abbr,{number:f,sym
bol:q(m,{abbr:q("h"),expanded:f>1?q("hours"):q("hour")})})):e<k*365?q(o.shortdat
e,{day:c.getDate(),month:q(l[c.getMonth()])}):q(o.longtime,{day:c.getDate(),mont
h:q(l[c.getMonth()]),year:c.getFullYear().toString().slice(2)}):""}var c=/(\d{4}
)-?(\d{2})-?(\d{2})T(\d{2}):?(\d{2}):?(\d{2})(Z|[\+\-]\d{2}:?\d{2})/,d=/[a-z]{3,
4} ([a-z]{3}) (\d{1,2}) (\d{1,2}):(\d{2}):(\d{2}) ([\+\-]\d{2}:?\d{2}) (\d{4})/i
,e=/[a-z]{3,4}, (\d{1,2}) ([a-z]{3}) (\d{4}) (\d{1,2}):(\d{2}):(\d{2}) ([\+\-]\d
{2}:?\d{2})/i,f=/^\d+$/,g=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep"
,"Oct","Nov","Dec"],h=1e3,i=h*60,j=i*60,k=j*24,l=k*7,m='<abbr title="%{expanded}
">%{abbr}</abbr>';a({parse:n,timeAgo:o})})});
provide("util/css",function(a){using("util/util",function(b){a({sanitize:functio
n(a,c,d){var e=/^[\w ,%\/"'\-_#]+$/,f=a&&b.map(a.split(";"),function(a){return b
.map(a.split(":").slice(0,2),function(a){return b.trim(a)})}),g=0,h,i=[],j=d?"!i
mportant":"";c=c||/^(font|text\-|letter\-|color|line\-)[\w\-]*$/;for(;f&&(h=f[g]
);g++)h[0].match(c)&&h[1].match(e)&&i.push(h.join(":")+j);return i.join(";")}})}
)});
provide("tfw/util/params",function(a){using("util/querystring","util/twitter",fu
nction(b,c){a(function(a,d){return function(e){var f,g="data-tw-params",h,i=e.in
nerHTML;if(!e)return;if(!c.isTwitterURL(e.href))return;if(e.getAttribute(g))retu
rn;e.setAttribute(g,!0);if(typeof d=="function"){f=d.call(this,e);for(h in f)f.h
asOwnProperty(h)&&(a[h]=f[h])}e.href=b.url(e.href,a),e.innerHTML=i}})})});
provide("$xd/json2.js", function(exports) {window.JSON||(window.JSON={}),functio
n(){function f(a){return a<10?"0"+a:a}function quote(a){return escapable.lastInd
ex=0,escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return
typeof b=="string"?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"'
:'"'+a+'"'}function str(a,b){var c,d,e,f,g=gap,h,i=b[a];i&&typeof i=="object"&&t
ypeof i.toJSON=="function"&&(i=i.toJSON(a)),typeof rep=="function"&&(i=rep.call(
b,a,i));switch(typeof i){case"string":return quote(i);case"number":return isFini
te(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if
(!i)return"null";gap+=indent,h=[];if(Object.prototype.toString.apply(i)==="[obje
ct Array]"){f=i.length;for(c=0;c<f;c+=1)h[c]=str(c,i)||"null";return e=h.length=
==0?"[]":gap?"[\n"+gap+h.join(",\n"+gap)+"\n"+g+"]":"["+h.join(",")+"]",gap=g,e}
if(rep&&typeof rep=="object"){f=rep.length;for(c=0;c<f;c+=1)d=rep[c],typeof d=="
string"&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e))}else for(d in i)Objec
t.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e));re
turn e=h.length===0?"{}":gap?"{\n"+gap+h.join(",\n"+gap)+"\n"+g+"}":"{"+h.join("
,")+"}",gap=g,e}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSO
N=function(a){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.g
etUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.ge
tUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Num
ber.prototype.toJSON=Boolean.prototype.toJSON=function(a){return this.valueOf()}
);var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f
\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u06
00-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\
uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r"
,'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!="function"&&(JSON.stringify=f
unction(a,b,c){var d;gap="",indent="";if(typeof c=="number")for(d=0;d<c;d+=1)ind
ent+=" ";else typeof c=="string"&&(indent=c);rep=b;if(!b||typeof b=="function"||
typeof b=="object"&&typeof b.length=="number")return str("",{"":a});throw new Er
ror("JSON.stringify")}),typeof JSON.parse!="function"&&(JSON.parse=function(text
,reviver){function walk(a,b){var c,d,e=a[b];if(e&&typeof e=="object")for(c in e)
Object.hasOwnProperty.call(e,c)&&(d=walk(e,c),d!==undefined?e[c]=d:delete e[c]);
return reviver.call(a,b,e)}var j;cx.lastIndex=0,cx.test(text)&&(text=text.replac

e(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));
if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").
replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").
replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),typeof reviver==
"function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}();exports();
loadrunner.Script.loaded.push("$xd/json2.js")});
provide("util/params",function(a){using("util/querystring",function(b){var c=fun
ction(a){var c=a.search.substr(1);return b.decode(c)},d=function(a){var c=a.href
,d=c.indexOf("#"),e=d<0?"":c.substring(d+1);return b.decode(e)},e=function(a){va
r b={},e=c(a),f=d(a);for(var g in e)e.hasOwnProperty(g)&&(b[g]=e[g]);for(var g i
n f)f.hasOwnProperty(g)&&(b[g]=f[g]);return b};a({combined:e,fromQuery:c,fromFra
gment:d})})});
provide("tfw/util/env",function(a){using("util/params",function(b){function d(){
var a=36e5,d=b.combined(document.location)._;return c!==undefined?c:(c=!1,d&&/^\
d+$/.test(d)&&(c=+(new Date)-parseInt(d)<a),c)}var c;a({isDynamicWidget:d})})});
provide("util/decider",function(a){function c(a){var c=b[a]||!1;if(!c)return!1;i
f(c===!0||c===100)return!0;var d=Math.random()*100,e=c>=d;return b[a]=e,e}var b=
{force_new_cookie:100,rufous_pixel:100,decider_fixture:12.34};a({isAvailable:c})
});
provide("dom/cookie",function(a){using("util/util",function(b){a(function(a,c,d)
{var e=b.aug({},d);if(arguments.length>1&&String(c)!=="[object Object]"){if(c===
null||c===undefined)e.expires=-1;if(typeof e.expires=="number"){var f=e.expires,
g=new Date((new Date).getTime()+f*60*1e3);e.expires=g}return c=String(c),documen
t.cookie=[encodeURIComponent(a),"=",e.raw?c:encodeURIComponent(c),e.expires?"; e
xpires="+e.expires.toUTCString():"",e.path?"; path="+e.path:"",e.domain?"; domai
n="+e.domain:"",e.secure?"; secure":""].join("")}e=c||{};var h,i=e.raw?function(
a){return a}:decodeURIComponent;return(h=(new RegExp("(?:^|; )"+encodeURICompone
nt(a)+"=([^;]*)")).exec(document.cookie))?i(h[1]):null})})});
provide("util/donottrack",function(a){using("dom/cookie",function(b){a(function(
a){var c=/\.(gov|mil)(:\d+)?$/i,d=/https?:\/\/([^\/]+).*/i;return a=a||document.
referrer,a=d.test(a)&&d.exec(a)[1],b("dnt")?!0:c.test(document.location.host)?!0
:a&&c.test(a)?!0:document.navigator?document.navigator["doNotTrack"]==1:navigato
r?navigator["doNotTrack"]==1||navigator["msDoNotTrack"]==1:!1})})});
provide("tfw/util/guest_cookie",function(a){using("dom/cookie","util/donottrack"
,"util/decider",function(b,c,d){function f(){var a=b(e)||!1;if(!a)return;a.match
(/^v3\:/)||g()}function g(){b(e)&&b(e,null,{domain:".twitter.com",path:"/"})}fun
ction h(){c()&&g()}var e="pid";a({set:h,destroy:g,forceNewCookie:f,guest_id_cook
ie:e})})});
provide("dom/sandbox",function(a){using("util/domready","util/env",function(b,c)
{function e(a,b){var c,d,e;if(a.name){try{e=document.createElement('<iframe name
="'+a.name+'"></iframe>')}catch(f){e=document.createElement("iframe"),e.name=a.n
ame}delete a.name}else e=document.createElement("iframe");a.id&&(e.id=a.id,delet
e a.id);for(c in a)a.hasOwnProperty(c)&&e.setAttribute(c,a[c]);e.allowtransparen
cy="true",e.scrolling="no",e.setAttribute("frameBorder",0),e.setAttribute("allow
Transparency",!0);for(d in b||{})b.hasOwnProperty(d)&&(e.style[d]=b[d]);return e
}function f(a,b,c,d){var f;this.attrs=b||{},this.styles=c||{},this.appender=d,th
is.onReady=a,this.sandbox={},f=e(this.attrs,this.styles),f.onreadystatechange=f.
onload=this.getCallback(this.onLoad),this.sandbox.frame=f,d?d(f):document.body.a
ppendChild(f)}function g(a,c,d,e){b(function(){new f(a,c,d,e)})}var d=0;window.t
wttr||(window.twttr={}),window.twttr.sandbox||(window.twttr.sandbox={}),f.protot
ype.getCallback=function(a){var b=this,c=!1;return function(){c||(c=!0,a.call(b)
)}},f.prototype.registerCallback=function(a){var b="cb"+d++;return window.twttr.
sandbox[b]=a,b},f.prototype.onLoad=function(){try{this.sandbox.frame.contentWind
ow.document}catch(a){this.setDocDomain();return}this.sandbox.win=this.sandbox.fr
ame.contentWindow,this.sandbox.doc=this.sandbox.frame.contentWindow.document,thi
s.writeStandardsDoc(),this.sandbox.body=this.sandbox.frame.contentWindow.documen
t.body,this.onReady(this.sandbox)},f.prototype.setDocDomain=function(){var a,b=t
his.registerCallback(this.getCallback(this.onLoad));a=["javascript:",'document.w
rite("");',"try { window.parent.document; }","catch (e) {",'document.domain="'+d
ocument.domain+'";',"}",'window.parent.twttr.sandbox["'+b+'"]();'].join(""),this

.sandbox.frame.parentNode.removeChild(this.sandbox.frame),this.sandbox.frame=nul
l,this.sandbox.frame=e(this.attrs,this.styles),this.sandbox.frame.src=a,this.app
ender?this.appender(this.sandbox.frame):document.body.appendChild(this.sandbox.f
rame)},f.prototype.writeStandardsDoc=function(){if(!c.anyIE()||c.cspEnabledIE())
return;var a=["<!DOCTYPE html>","<html>","<head>","<scr","ipt>","try { window.pa
rent.document; }",'catch (e) {document.domain="'+document.domain+'";}',"</scr","
ipt>","</head>","<body></body>","</html>"].join("");this.sandbox.doc.write(a),th
is.sandbox.doc.close()},a(g)})});
provide("tfw/util/tracking",function(a){using("dom/cookie","dom/sandbox","util/d
onottrack","tfw/util/guest_cookie","tfw/util/env","util/util","$xd/json2.js",fun
ction(b,c,d,e,f,g,h){function u(){function a(a){s=a.frame,r=a.doc,q=a.doc.body,m
=F(),n=G();while(o[0])z.apply(this,o.shift());p&&A()}s=document.getElementById("
rufous-sandbox"),s?(r=s.contentWindow.document,q=r.body):c(a,{id:"rufous-sandbox
"},{display:"none"})}function v(a,b,c,d){var e=!g.isObject(a),f=b?!g.isObject(b)
:!1,h,i;if(e||f)return;if(/Firefox/.test(navigator.userAgent))return;h=C(a),i=D(
b,!!c,!!d),y(h,i,!0)}function w(a,c,h,i){var k=j[c],l,m,n=e.guest_id_cookie;if(!
k)return;a=a||{},i=!!i,h=!!h,m=a.original_redirect_referrer||document.referrer,i
=i||d(m),l=g.aug({},a),h||(x(l,"referrer",m),x(l,"widget",+f.isDynamicWidget()),
x(l,"hask",+!!b("k")),x(l,"li",+!!b("twid")),x(l,n,b(n)||"")),i&&(x(l,"dnt",1),I
(l)),H(k+"?"+E(l))}function x(a,b,c){var d=i+b;if(!a)return;return a[d]=c,a}func
tion y(a,b,c){var d,e,f,h,i,j="https://r.twimg.com/jot?";if(!g.isObject(a)||!g.i
sObject(b))return;if(Math.random()>t)return;f=g.aug({},b,{event_namespace:a}),c?
(j+=E({l:J(f)}),H(j)):(d=m.firstChild,d.value=+d.value||+f.dnt,h=J(f),e=r.create
Element("input"),e.type="hidden",e.name="l",e.value=h,m.appendChild(e))}function
z(a,b,c,d){var e=!g.isObject(a),f=b?!g.isObject(b):!1,h,i;if(e||f)return;if(!q|
|!m){o.push([a,b,c,d]);return}h=C(a),i=D(b,!!c,!!d),y(h,i)}function A(){if(!m){p
=!0;return}if(m.children.length<=1)return;q.appendChild(m),q.appendChild(n),m.su
bmit(),window.setTimeout(B(m,n),6e4),m=F(),n=G()}function B(a,b){return function
(){var c=a.parentNode;c.removeChild(a),c.removeChild(b)}}function C(a){var b={cl
ient:"tfw"},c,d;return c=g.aug(b,a||{}),c}function D(a,b,c){var e={_category_:"t
fw_client_event"},f,h,i;return b=!!b,c=!!c,f=g.aug(e,a||{}),h=f.widget_origin||d
ocument.referrer,f.format_version=1,f.dnt=c=c||d(h),f.triggered_on=f.triggered_o
n||+(new Date),b||(f.widget_origin=h),c&&I(f),f}function E(a){var b=[],c,d,e;for
(c in a)a.hasOwnProperty(c)&&(d=encodeURIComponent(c),e=encodeURIComponent(a[c])
,e=e.replace(/'/g,"%27"),b.push(d+"="+e));return b.join("&")}function F(){var a=
r.createElement("form"),b=r.createElement("input");return l++,a.action="https://
r.twimg.com/jot",a.method="POST",a.target="rufous-frame-"+l,a.id="rufous-form-"+
l,b.type="hidden",b.name="dnt",b.value=0,a.appendChild(b),a}function G(){var a,b
="rufous-frame-"+l,c=0;try{a=r.createElement("<iframe name="+b+">")}catch(d){a=r
.createElement("iframe"),a.name=b}return a.id=b,a.style.display="none",a.width=0
,a.height=0,a.border=0,a}function H(a){var b=document.createElement("img");b.src
=a,b.alt="",b.style.position="absolute",b.style.height="1px",b.style.width="1px"
,b.style.top="-9999px",b.style.left="-9999px",document.body.appendChild(b)}funct
ion I(a){var b;for(b in a)~g.indexOf(k,b)&&delete a[b]}function J(a){var b=Array
.prototype.toJSON,c;return delete Array.prototype.toJSON,c=JSON.stringify(a),b&&
(Array.prototype.toJSON=b),c}var i="twttr_",j={tweetbutton:"//p.twitter.com/t.gi
f",followbutton:"//p.twitter.com/f.gif",tweetembed:"//p.twitter.com/e.gif"},k=["
hask","li","logged_in","pid","user_id",e.guest_id_cookie,i+"hask",i+"li",i+e.gue
st_id_cookie],l=0,m,n,o=[],p,q,r,s,t=1;e.forceNewCookie(),a({enqueue:z,flush:A,i
nitPostLogging:u,addPixel:v,addLegacyPixel:w,addVar:x})})});
provide("util/logger",function(a){function c(a){window[b]&&window[b].log&&window
[b].log(a)}function d(a){window[b]&&window[b].warn&&window[b].warn(a)}function e
(a){window[b]&&window[b].error&&window[b].error(a)}var b=["con","sole"].join("")
;a({info:c,warn:d,error:e})});
provide("tfw/util/data",function(a){using("util/logger","util/util","util/querys
tring",function(b,c,d){function l(a,b){return a=={}.toString.call(b).match(/\s([
a-zA-Z]+)/)[1].toLowerCase()}function m(a){return function(c){c.error?a.error&&a
.error(c):c.headers&&c.headers.status!=200?(a.error&&a.error(c),b.warn(c.headers
.message)):a.success&&a.success(c),a.complete&&a.complete(c),n(a)}}function n(a)
{var b=a.script;b&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNod

e.removeChild(b),a.script=undefined,b=undefined),a.callbackName&&twttr.tfw.callb
acks[a.callbackName]&&delete twttr.tfw.callbacks[a.callbackName]}function o(a){v
ar b={};return a.success&&l("function",a.success)&&(b.success=a.success),a.error
&&l("function",a.error)&&(b.error=a.error),a.complete&&l("function",a.complete)&
&(b.complete=a.complete),b}function p(a,b,c){var d=a.length,e=[],f={},g=0;return
function(e){var h,i=[],j=[],k=[],l,m;h=c(e),f[h]=e;if(++g===d){for(l=0;l<d;l++)
m=f[a[l]],i.push(m),m.error?k.push(m):j.push(m);b.error&&k.length>0&&b.error(k),
b.success&&j.length>0&&b.success(j),b.complete&&b.complete(i)}}}twttr=twttr||{},
twttr.tfw=twttr.tfw||{},twttr.tfw.callbacks=twttr.tfw.callbacks||{};var e="twttr
.tfw.callbacks",f=twttr.tfw.callbacks,g="cb",h=0,i=!1,j={},k={userLookup:"//api.
twitter.com/1/users/lookup.json",userShow:"//cdn.api.twitter.com/1/users/show.js
on",status:"//cdn.api.twitter.com/1/statuses/show.json",tweets:"//syndication.tw
img.com/tweets.json",count:"//cdn.api.twitter.com/1/urls/count.json",friendship:
"//cdn.api.twitter.com/1/friendships/exists.json",timeline:"//cdn.syndication.tw
img.com/widgets/timelines/",timelinePoll:"//syndication.twimg.com/widgets/timeli
nes/paged/",timelinePreview:"//syndication.twimg.com/widgets/timelines/preview/"
};twttr.widgets&&twttr.widgets.endpoints&&c.aug(k,twttr.widgets.endpoints),j.jso
np=function(a,b,c){var j=c||g+h,k=e+"."+j,l=document.createElement("script"),n={
callback:k,suppress_response_codes:!0};f[j]=m(b);if(i||!/^https?\:$/.test(window
.location.protocol))a=a.replace(/^\/\//,"https://");l.src=d.url(a,n),l.async="as
ync",document.body.appendChild(l),b.script=l,b.callbackName=j,c||h++},j.config=f
unction(a){if(a.forceSSL===!0||a.forceSSL===!1)i=a.forceSSL},j.user=function(){v
ar a,b={},c,e,f;arguments.length===1?(a=arguments[0].screenName,b=o(arguments[0]
)):(a=arguments[0],b.success=arguments[1]),c=l("array",a)?k.userLookup:k.userSho
w,a=l("array",a)?a.join(","):a,e={screen_name:a},f=d.url(c,e),this.jsonp(f,b)},j
.userById=function(a){var b,c={},e,f,g;arguments.length===1?(b=arguments[0].ids,
c=o(arguments[0])):(b=arguments[0],c.success=arguments[1]),e=l("array",b)?k.user
Lookup:k.userShow,b=l("array",b)?b.join(","):b,f={user_id:b},g=d.url(e,f),this.j
sonp(g,c)},j.status=function(){var a,b={},c,e,f,g;arguments.length===1?(a=argume
nts[0].id,b=o(arguments[0])):(a=arguments[0],b.success=arguments[1]);if(!l("arra
y",a))c={id:a,include_entities:!0},e=d.url(k.status,c),this.jsonp(e,b);else{f=p(
a,b,function(a){return a.error?a.request.split("id=")[1].split("&")[0]:a.id_str}
);for(g=0;g<a.length;g++)c={id:a[g],include_entities:!0},e=d.url(k.status,c),thi
s.jsonp(e,{success:f,error:f})}},j.tweets=function(a){var b=arguments[0],c=o(b),
e={ids:a.ids.join(","),lang:a.lang},f=d.url(k.tweets,e);this.jsonp(f,c)},j.count
=function(){var a="",b,c,e={};arguments.length===1?(a=arguments[0].url,e=o(argum
ents[0])):arguments.length===2&&(a=arguments[0],e.success=arguments[1]),c={url:a
},b=d.url(k.count,c),this.jsonp(b,e)},j.friendshipExists=function(a){var b=argum
ents[0],c=o(arguments[0]),e={screen_name_a:a.screenNameA,screen_name_b:a.screenN
ameB},f=d.url(k.friendship,e);this.jsonp(f,c)},j.timeline=function(a){var b=argu
ments[0],c=o(b),e,f=9e5,g=Math.floor(+(new Date)/f),h={lang:a.lang,t:g,domain:wi
ndow.location.host};a.dnt&&(h.dnt=a.dnt),a.screenName&&(h.screen_name=a.screenNa
me),a.userId&&(h.user_id=a.userId),a.withReplies&&(h.with_replies=a.withReplies)
,e=d.url(k.timeline+a.id,h),this.jsonp(e,c,"tl_"+a.id)},j.timelinePoll=function(
a){var b=arguments[0],c=o(b),e={lang:a.lang,since_id:a.sinceId,max_id:a.maxId,do
main:window.location.host},f;a.dnt&&(e.dnt=a.dnt),a.screenName&&(e.screen_name=a
.screenName),a.userId&&(e.user_id=a.userId),a.withReplies&&(e.with_replies=a.wit
hReplies),f=d.url(k.timelinePoll+a.id,e),this.jsonp(f,c,"tlPoll_"+a.id+"_"+(a.si
nceId||a.maxId))},j.timelinePreview=function(a){var b=arguments[0],c=o(b),e=a.pa
rams,f=d.url(k.timelinePreview,e);this.jsonp(f,c)},a(j)})});
provide("anim/transition",function(a){function b(a,b){var c;return b=b||window,c
=b.requestAnimationFrame||b.webkitRequestAnimationFrame||b.mozRequestAnimationFr
ame||b.msRequestAnimationFrame||b.oRequestAnimationFrame||function(c){b.setTimeo
ut(function(){a(+(new Date))},1e3/60)},c(a)}function c(a,b){return Math.sin(Math
.PI/2*b)*a}function d(a,c,d,e,f){function i(h){var j=h-g,k=Math.min(j/d,1),l=e?e
(c,k):c*k;a(l);if(k==1)return;b(i,f)}var g=+(new Date),h;b(i)}a({animate:d,reque
stAnimationFrame:b,easeOut:c})});
provide("tfw/util/assets",function(a){using("util/env",function(b){function d(a,
d){var e=c[a],f;return b.retina()?f="2x":b.ie6()||b.ie7()?f="gif":f="default",d&
&(f+=".rtl"),e[f]}var c={"embed/timeline.css":{"default":"embed/timeline.c589b3c

adbed15eba44ca85b5ebf4d4a.default.css","2x":"embed/timeline.c589b3cadbed15eba44c
a85b5ebf4d4a.2x.css",gif:"embed/timeline.c589b3cadbed15eba44ca85b5ebf4d4a.gif.cs
s","default.rtl":"embed/timeline.c589b3cadbed15eba44ca85b5ebf4d4a.default.rtl.cs
s","2x.rtl":"embed/timeline.c589b3cadbed15eba44ca85b5ebf4d4a.2x.rtl.css","gif.rt
l":"embed/timeline.c589b3cadbed15eba44ca85b5ebf4d4a.gif.rtl.css"},"embed/embed.6
c27ff0b627db7ce46be4331ae68cf0a.css":{"default":"embed/embed.default.css","2x":"
embed/embed.2x.css",gif:"embed/embed.gif.css","default.rtl":"embed/embed.default
.rtl.css","2x.rtl":"embed/embed.2x.rtl.css","gif.rtl":"embed/embed.gif.rtl.css"}
};a(d)})});
provide("tfw/widget/syndicatedbase",function(a){using("tfw/widget/base","tfw/wid
get/intent","tfw/util/assets","tfw/util/globals","dom/classname","dom/delegate",
"dom/sandbox","util/env","util/twitter","util/util",function(b,c,d,e,f,g,h,i,j,k
){function s(){p=v.VALID_COLOR.test(e.val("widgets:link-color"))&&RegExp.$1,r=v.
VALID_COLOR.test(e.val("widgets:border-color"))&&RegExp.$1,q=e.val("widgets:them
e")}function t(a,b,c){var d;c=c||document;if(c.getElementById(a))return;d=c.crea
teElement("link"),d.id=a,d.rel="stylesheet",d.type="text/css",d.href=twttr.widge
ts.config.assetUrl()+"/"+b,c.getElementsByTagName("head")[0].appendChild(d)}func
tion u(a){var b=f.present(document.documentElement,"twitter-dev")?"components/sy
ndication-templates/lib/css/index.css":d("embed/timeline.css");t("twitter-widget
-css",b,a)}function v(a){if(!a)return;var c,d,e=this;this.sandboxReadyCallbacks=
[],b.apply(this,[a]),c=this.params(),this.targetEl=this.srcEl&&this.srcEl.parent
Node||c.targetEl||document.body,this.containerWidth=this.targetEl&&this.targetEl
.offsetWidth,d=c.width||this.attr("width")||this.containerWidth||this.dimensions
.DEFAULT_WIDTH,this.height=v.VALID_UNIT.test(c.height||this.attr("height"))&&Reg
Exp.$1,this.width=Math.max(this.dimensions.MIN_WIDTH,Math.min(v.VALID_UNIT.test(
d)?RegExp.$1:this.dimensions.DEFAULT_WIDTH,this.dimensions.DEFAULT_WIDTH)),this.
narrow=c.narrow||this.width<=this.dimensions.NARROW_WIDTH,this.narrow&&this.clas
sAttr.push("var-narrow"),v.VALID_COLOR.test(c.linkColor||this.dataAttr("link-col
or"))?this.linkColor=RegExp.$1:this.linkColor=p,v.VALID_COLOR.test(c.borderColor
||this.dataAttr("border-color"))?this.borderColor=RegExp.$1:this.borderColor=r,t
his.theme=c.theme||this.attr("data-theme")||q,this.theme=/(dark|light)/.test(thi
s.theme)?this.theme:"",this.classAttr.push(i.touch()?"is-touch":"not-touch"),h(f
unction(a){e.sandboxReady=!0,e.setupSandbox.call(e,a)},{"class":this.renderedCla
ssNames,id:this.id},{width:"1px",height:"1px",border:"none",position:"absolute"}
,function(a){e.srcEl?e.targetEl.insertBefore(a,e.srcEl):e.targetEl.appendChild(a
)})}var l=[".customisable",".customisable:link",".customisable:visited",".custom
isable:hover",".customisable:active",".customisable-highlight:hover","a:hover .c
ustomisable-highlight","a:focus .customisable-highlight"],m=["a:hover .ic-mask",
"a:focus .ic-mask"],n=[".customisable-border"],o=[".timeline-header h1.summary",
".timeline-header h1.summary a:link",".timeline-header h1.summary a:visited"],p,
q,r;v.prototype=new b,k.aug(v.prototype,{setupSandbox:function(a){var b=a.doc,c=
b.createElement("base"),d=b.createElement("style"),f=b.getElementsByTagName("hea
d")[0],g="body{display:none}",h=this,i;this.sandbox=a,a.frame.title=this.a11yTit
le,u(a.doc),c.target="_blank",f.appendChild(c),e.val("widgets:csp")!="on"&&(d.ty
pe="text/css",d.styleSheet?d.styleSheet.cssText=g:d.appendChild(b.createTextNode
(g)),f.appendChild(d)),this.handleResize&&window.addEventListener?window.addEven
tListener("resize",function(){h.handleResize()},!0):document.body.attachEvent("o
nresize",function(){h.handleResize()}),a.win.onresize=function(a){h.handleResize
&&h.handleResize()},this.frameIsReady=!0;for(;i=this.sandboxReadyCallbacks.shift
();)i.fn.apply(i.context,i.args)},callsWhenSandboxReady:function(a){var b=this;r
eturn function(){var c=[],d=arguments.length,e=0;for(;e<d;e++)c.push(arguments[e
]);b.callIfSandboxReady(a,b,c)}},callIfSandboxReady:function(a,b,c){c=c||[],b.fr
ameIsReady?a.apply(b,[!1].concat(c)):b.sandboxReadyCallbacks.push({fn:a,context:
b,args:[!0].concat(c)})},contentWidth:function(){var a=this.chromeless?0:this.na
rrow?this.dimensions.NARROW_MEDIA_PADDING:this.dimensions.WIDE_MEDIA_PADDING;ret
urn this.width-a},addSiteStyles:function(){var a=this,b=this.sandbox.doc,c=this.
id+"-styles",d,f=0,g=function(b){return(a.theme=="dark"?".thm-dark ":"")+b},h=""
,i="",j="",p="";if(e.val("widgets:csp")=="on")return;if(b.getElementById(c))retu
rn;this.headingStyle&&(j=k.map(o,g).join(",")+"{"+this.headingStyle+"}"),this.li
nkColor&&(h=k.map(l,g).join(",")+"{color:"+this.linkColor+"}",i=k.map(m,g).join(

",")+"{background-color:"+this.linkColor+"}"),this.borderColor&&(p=k.map(n,g).co
ncat(this.theme=="dark"?[".thm-dark.customisable-border"]:[]).join(",")+"{border
-color:"+this.borderColor+"}");if(!h&&!i&&!j)return;d=b.createElement("style"),d
.id=c,d.type="text/css",d.styleSheet?d.styleSheet.cssText=h+i+j+p:(d.appendChild
(b.createTextNode(h)),d.appendChild(b.createTextNode(i)),d.appendChild(b.createT
extNode(j)),d.appendChild(b.createTextNode(p))),b.getElementsByTagName("head")[0
].appendChild(d)},bindIntentHandlers:function(){var a=this,b=this.element;g.dele
gate(b,"click",".profile",function(b){var d;a.addUrlParams(this),d=j.intentForPr
ofileURL(this.href);if(b.altKey||b.metaKey||b.shiftKey)return;d&&(c.open(d),g.pr
eventDefault(b))}),g.delegate(b,"click",".web-intent",function(b){a.addUrlParams
(this);if(b.altKey||b.metaKey||b.shiftKey)return;c.open(this.href),g.preventDefa
ult(b)})}}),v.VALID_UNIT=/^([0-9]+)( ?px)?$/,v.VALID_COLOR=/^(#(?:[0-9a-f]{3}|[0
-9a-f]{6}))$/i,v.retinize=function(a){if(!i.retina())return;var b=a.getElementsB
yTagName("IMG"),c,d,e=0,f=b.length;for(;e<f;e++)c=b[e],d=c.getAttribute("data-sr
c-2x"),d&&(c.src=d)},v.scaleDimensions=function(a,b,c,d){return b>a&&b>d?(a*=d/b
,b=d):a>c&&(b*=c/a,a=c,b>d&&(a*=d/b,b=d)),{width:Math.ceil(a),height:Math.ceil(b
)}},v.constrainMedia=function(a,b){var c=a.getElementsByTagName("IMG"),d=a.getEl
ementsByTagName("IFRAME"),e,f,g,h=0,i=0,j;for(;e=[c,d][i];i++)if(e.length)for(j=
0;f=e[j];j++)g=v.scaleDimensions(f.getAttribute("width")||f.width,f.getAttribute
("height")||f.height,b,375),g.width>0&&(f.width=g.width),g.height>0&&(f.height=g
.height),h=g.height>h?g.height:h;return h},s(),a(v)})});
provide("tfw/widget/timeline",function(a){using("tfw/widget/syndicatedbase","ani
m/transition","tfw/widget/intent","tfw/util/data","tfw/util/tracking","tfw/util/
params","util/css","util/datetime","util/env","util/iframe","util/insert","util/
throttle","util/twitter","util/querystring","util/util","dom/delegate","dom/clas
sname","dom/get",function(b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s){function N(a){if(
!a)return;var c,d,e;this.a11yTitle=this._("Twitter Timeline Widget"),b.apply(thi
s,[a]),c=this.params(),d=(c.chrome||this.dataAttr("chrome")||"").split(" "),this
.preview=c.previewParams,this.widgetId=c.widgetId||this.dataAttr("widget-id"),th
is.widgetScreenName=c.screenName||this.dataAttr("screen-name"),this.widgetUserId
=c.userId||this.dataAttr("user-id");if(c.showReplies===!0||this.dataAttr("show-r
eplies")=="true")this.widgetShowReplies="true";d.length&&(e=~p.indexOf(d,"none")
,this.chromeless=e||~p.indexOf(d,"transparent"),this.headerless=e||~p.indexOf(d,
"noheader"),this.footerless=e||~p.indexOf(d,"nofooter"),this.borderless=e||~p.in
dexOf(d,"noborders")),this.headingStyle=h.sanitize(c.headingStyle||this.dataAttr
("heading-style"),undefined,!0),this.classAttr.push("twitter-timeline-rendered")
,this.ariaPolite=c.ariaPolite||this.dataAttr("aria-polite")}function O(a,c){var
d=a.ownerDocument,e=s.one(D,a,"DIV"),f=e&&e.children[0],g=f&&f.getAttribute("dat
a-expanded-media"),h,i=0,j=s.one(E,a,"A"),k=j&&j.getElementsByTagName("B")[0],l=
k&&(k.innerText||k.textContent),m;if(!k)return;k.innerHTML=j.getAttribute("datatoggled-text"),j.setAttribute("data-toggled-text",l);if(r.present(a,C)){r.remove
(a,C);if(!e)return;e.style.cssText="",f.innerHTML="";return}g&&(h=d.createElemen
t("DIV"),h.innerHTML=g,b.retinize(h),i=b.constrainMedia(h,c),f.appendChild(h)),e
&&(m=Math.max(f.offsetHeight,i),e.style.cssText="height:"+m+"px"),r.add(a,C)}var
t="1.0",u={CLIENT_SIDE_USER:0,CLIENT_SIDE_APP:2},v="timeline",w="new-tweets-bar
",x="timeline-header",y="timeline-footer",z="stream",A="h-feed",B="tweet",C="exp
anded",D="detail-expander",E="expand",F="permalink",G="tweet-box-button",H="twit
ter-follow-button",I="no-more-pane",J="pending-scroll-in",K="pending-new-tweet",
L="show-new-tweet",M="show-tweet-box";N.prototype=new b,p.aug(N.prototype,{rende
redClassNames:"twitter-timeline twitter-timeline-rendered",dimensions:{DEFAULT_H
EIGHT:"600",DEFAULT_WIDTH:"520",NARROW_WIDTH:"320",MIN_WIDTH:"180",MIN_HEIGHT:"2
00",WIDE_MEDIA_PADDING:81,NARROW_MEDIA_PADDING:16},create:function(a){var c=this
.sandbox.doc.createElement("div"),d,e=this,g,h,i,j=[],k,l;c.innerHTML=a.body,d=c
.children[0]||!1;if(!d)return;this.reconfigure(a.config),this.augmentWidgets(d),
b.retinize(d),b.constrainMedia(d,this.contentWidth()),this.searchQuery=d.getAttr
ibute("data-search-query"),this.profileId=d.getAttribute("data-profile-id"),k=th
is.getTweetDetails(c);for(l in k)k.hasOwnProperty(l)&&j.push(l);return f.enqueue
({page:"timeline",component:"timeline",element:"initial",action:j.length?"result
s":"no_results"},{widget_id:this.widgetId,widget_origin:document.location.href,i
tem_ids:j,item_details:k,client_version:t,message:this.partner,query:this.search

Query,profile_id:this.profileId},!0,this.dnt),f.flush(),this.ariaPolite=="assert
ive"&&(h=s.one(w,d,"DIV"),h.setAttribute("aria-polite","assertive")),d.id=this.i
d,d.className+=" "+this.classAttr.join(" "),d.lang=this.lang,twttr.widgets.load(
d),i=function(){e.sandbox.body.appendChild(d),e.sandbox.win.setTimeout(function(
){var a=s.one(x,d,"DIV"),b=s.one(y,d,"DIV"),c=s.one(z,d,"DIV");b?g=a.offsetHeigh
t+b.offsetHeight:g=a.offsetHeight,c.style.cssText="height:"+(e.height-g-2)+"px"}
,500),e.sandbox.frame.style.cssText="",e.sandbox.frame.width=e.width,e.sandbox.f
rame.height=e.height,e.sandbox.frame.style.border="none",e.sandbox.frame.style.m
axWidth="100%",e.sandbox.frame.style.minWidth=e.dimensions.MIN_WIDTH+"px"},this.
callsWhenSandboxReady(i)(),this.srcEl&&this.srcEl.parentNode&&this.srcEl.parentN
ode.removeChild(this.srcEl),d},render:function(a,b){function j(){d.success=funct
ion(a){c.element=c.create(a),c.readTranslations(),c.bindInteractions(),b&&b(c.sa
ndbox.frame);return},d.error=function(a){a&&a.headers&&b&&b(a.headers.status)},d
.params=c.preview,e.timelinePreview(d);return}function k(){f.initPostLogging(),e
.timeline({id:c.widgetId,screenName:c.widgetScreenName,userId:c.widgetUserId,wit
hReplies:c.widgetShowReplies,dnt:c.dnt,lang:c.lang,success:function(a){c.element
=c.create(a),c.readTranslations(),c.bindInteractions(),a.headers.xPolling&&/\d/.
test(a.headers.xPolling)&&(c.pollInterval=a.headers.xPolling*1e3),c.updateTimeSt
amps(),c.schedulePolling(),b&&b(c.sandbox.frame);return},error:function(a){a&&a.
headers&&b&&b(a.headers.status)}})}var c=this,d={},g,h,i;if(!this.preview&&!this
.widgetId){b&&b(400);return}i=this.preview?j:k,this.sandboxReady?i():window.setT
imeout(i,0)},reconfigure:function(a){this.lang=a.lang,this.theme||(this.theme=a.
theme),this.theme=="dark"&&this.classAttr.push("thm-dark"),this.chromeless&&this
.classAttr.push("var-chromeless"),this.borderless&&this.classAttr.push("var-bord
erless"),this.headerless&&this.classAttr.push("var-headerless"),this.footerless&
&this.classAttr.push("var-footerless"),!this.linkColor&&a.linkColor&&b.VALID_COL
OR.test(a.linkColor)&&(this.linkColor=RegExp.$1),this.addSiteStyles(),!this.heig
ht&&b.VALID_UNIT.test(a.height)&&(this.height=RegExp.$1),this.height=Math.max(th
is.dimensions.MIN_HEIGHT,this.height?this.height:this.dimensions.DEFAULT_HEIGHT)
,this.preview&&this.classAttr.push("var-preview"),this.narrow=this.width<=this.d
imensions.NARROW_WIDTH,this.narrow&&this.classAttr.push("var-narrow")},getTweetD
etails:function(a){var b=s.all(B,a,"LI"),c={},d,e,f,g,h={TWEET:0,RETWEET:10},i=0
;for(;d=b[i];i++)e=s.one(F,d,"A"),f=n.status(e.href),g=d.getAttribute("data-twee
t-id"),f===g?c[f]={item_type:h.TWEET}:c[f]={item_type:h.RETWEET,target_type:h.TW
EET,target_id:g};return c},bindInteractions:function(){var a=this,b=this.element
,c=!0;this.bindIntentHandlers(),q.delegate(b,"click","."+E,function(c){if(c.altK
ey||c.metaKey||c.shiftKey)return;O(s.ancestor("."+B,this,b),a.contentWidth()),q.
stop(c)}),q.delegate(b,"click","A",function(a){q.stopPropagation(a)}),q.delegate
(b,"click",".with-expansion",function(b){O(this,a.contentWidth()),q.stop(b)}),q.
delegate(b,"click",".load-more",function(b){a.loadMore()}),q.delegate(b,"click",
"."+w,function(b){a.scrollToTop(),a.hideNewTweetNotifier(!0)}),q.delegate(b,"cli
ck",".load-tweets",function(b){c&&(c=!1,a.forceLoad(),q.stop(b))}),q.delegate(b,
"click",".display-sensitive-image",function(c){a.showNSFW(s.ancestor("."+B,this,
b)),q.stop(c)}),q.delegate(b,"mouseover","."+v,function(b){a.mouseOver=!0}),q.de
legate(b,"mouseout","."+v,function(b){a.mouseOver=!1}),q.delegate(b,"mouseover",
"."+w,function(b){a.mouseOverNotifier=!0}),q.delegate(b,"mouseout","."+w,functio
n(b){a.mouseOverNotifier=!1,window.setTimeout(function(){a.hideNewTweetNotifier(
)},3e3)})},scrollToTop:function(){var a=s.one(z,this.element,"DIV");a.scrollTop=
0,a.focus()},update:function(){var a=this,b=s.one(B,this.element,"LI"),c=b&&b.ge
tAttribute("data-tweet-id");this.updateTimeStamps(),this.requestTweets(c,!0,func
tion(b){b.childNodes.length>0&&a.insertNewTweets(b)})},loadMore:function(){var a
=this,b=s.all(B,this.element,"LI").pop(),c=b&&b.getAttribute("data-tweet-id");th
is.requestTweets(c,!1,function(b){var d=s.one(I,a.element,"P"),e=b.childNodes[0]
;d.style.cssText="",e&&e.getAttribute("data-tweet-id")==c&&b.removeChild(e);if(b
.childNodes.length>0){a.appendTweets(b);return}r.add(a.element,"no-more"),d.focu
s()})},forceLoad:function(){var a=this,b=!!s.all(A,this.element,"OL").length;thi
s.requestTweets(1,!0,function(c){c.childNodes.length&&(a[b?"insertNewTweets":"ap
pendTweets"](c),r.add(a.element,"has-tweets"))})},schedulePolling:function(a){va
r b=this;if(this.pollInterval===null)return;a=twttr.widgets.poll||a||this.pollIn
terval||1e4,a>-1&&window.setTimeout(function(){this.isUpdating||b.update(),b.sch

edulePolling()},a)},requestTweets:function(a,c,d){var g=this,h={id:this.widgetId
,screenName:this.widgetScreenName,userId:this.widgetUserId,withReplies:this.widg
etShowReplies,dnt:this.dnt,lang:this.lang};h[c?"sinceId":"maxId"]=a,h.complete=f
unction(){this.isUpdating=!1},h.error=function(a){if(a&&a.headers){if(a.headers.
status=="404"){g.pollInterval=null;return}if(a.headers.status=="503"){g.pollInte
rval*=1.5;return}}},h.success=function(a){var e=g.sandbox.doc.createDocumentFrag
ment(),h=g.sandbox.doc.createElement("div"),i=[],j,k;a&&a.headers&&a.headers.xPo
lling&&/\d+/.test(a.headers.xPolling)&&(g.pollInterval=a.headers.xPolling*1e3);i
f(a&&a.body!==undefined){h.innerHTML=a.body;if(h.children[0]&&h.children[0].tagN
ame!="LI")return;j=g.getTweetDetails(h);for(k in j)j.hasOwnProperty(k)&&i.push(k
);i.length&&(f.enqueue({page:"timeline",component:"timeline",element:c?"newer":"
older",action:"results"},{widget_id:g.widgetId,widget_origin:document.location.h
ref,item_ids:i,item_details:j,client_version:t,message:g.partner,query:g.searchQ
uery,profile_id:g.profileId,event_initiator:c?u.CLIENT_SIDE_APP:u.CLIENT_SIDE_US
ER},!0,g.dnt),f.flush()),b.retinize(h),b.constrainMedia(h,g.contentWidth());whil
e(h.children[0])e.appendChild(h.children[0]);d(e)}},e.timelinePoll(h)},insertNew
Tweets:function(a){var b=this,d=s.one(z,this.element,"DIV"),e=s.one(A,d,"OL"),f=
e.offsetHeight,g;this.updateTimeStamps(),e.insertBefore(a,e.firstChild),g=e.offs
etHeight-f;if(d.scrollTop>40||this.mouseIsOver()){d.scrollTop=d.scrollTop+g,this
.showNewTweetNotifier();return}r.remove(this.element,J),e.style.cssText="margintop: -"+g+"px",window.setTimeout(function(){d.scrollTop=0,r.add(b.element,J),j.c
ssTransitions()?e.style.cssText="":c.animate(function(a){a<g?e.style.cssText="ma
rgin-top: -"+(g-a)+"px":e.style.cssText=""},g,500,c.easeOut)},500),this.gcTweets
(50)},appendTweets:function(a){var b=s.one(z,this.element,"DIV"),c=s.one(A,b,"OL
");this.updateTimeStamps(),c.appendChild(a)},gcTweets:function(a){var b=s.one(A,
this.element,"OL"),c=b.children.length,d;a=a||50;for(;c>a&&(d=b.children[c-1]);c
--)b.removeChild(d)},showNewTweetNotifier:function(){var a=this,b=s.one(w,this.e
lement,"DIV"),c=b.children[0];b.style.cssText="",r.add(this.element,K),b.removeC
hild(c),b.appendChild(c),r.replace(this.element,K,L),this.newNoticeDisplayTime=+
(new Date),window.setTimeout(function(){a.hideNewTweetNotifier()},5e3)},hideNewT
weetNotifier:function(a){var b=this,c=s.one(w,this.element,"DIV");if(!a&&this.mo
useOverNotifier)return;r.replace(this.element,L,K),window.setTimeout(function(){
r.remove(b.element,K)},500)},augmentWidgets:function(a){var b=s.all(H,a,"A"),c=0
,d;for(;d=b[c];c++)d.setAttribute("data-related",this.related),d.setAttribute("d
ata-partner",this.partner),d.setAttribute("data-dnt",this.dnt),d.setAttribute("d
ata-search-query",this.searchQuery),d.setAttribute("data-profile-id",this.profil
eId),this.width<250&&d.setAttribute("data-show-screen-name","false")},readTransl
ations:function(){var a=this.element,b="data-dt-";this.i18n={phrases:{now:a.getA
ttribute(b+"now"),s:a.getAttribute(b+"s"),m:a.getAttribute(b+"m"),h:a.getAttribu
te(b+"h"),second:a.getAttribute(b+"second"),seconds:a.getAttribute(b+"seconds"),
minute:a.getAttribute(b+"minute"),minutes:a.getAttribute(b+"minutes"),hour:a.get
Attribute(b+"hour"),hours:a.getAttribute(b+"hours")},months:a.getAttribute(b+"mo
nths").split("|"),formats:{abbr:a.getAttribute(b+"abbr"),shortdate:a.getAttribut
e(b+"short"),longdate:a.getAttribute(b+"long")}}},updateTimeStamps:function(){va
r a=s.all(F,this.element,"A"),b,c,d=0,e,f;for(;b=a[d];d++){e=b.getAttribute("dat
a-datetime"),f=e&&i.timeAgo(e,this.i18n),c=b.getElementsByTagName("TIME")[0];if(
!f)continue;if(c&&c.innerHTML){c.innerHTML=f;continue}b.innerHTML=f}},mouseIsOve
r:function(){return this.mouseOver},addUrlParams:function(a){var b=this,c={tw_w:
this.widgetId,related:this.related,partner:this.partner,query:this.searchQuery,p
rofile_id:this.profileId,tw_p:"embeddedtimeline"};return this.addUrlParams=g(c,f
unction(a){var c=s.ancestor("."+B,a,b.element);return c&&{tw_i:c.getAttribute("d
ata-tweet-id")}}),this.addUrlParams(a)},showNSFW:function(a){var c=s.one("nsfw",
a,"DIV"),d,e,f=0,g,h,i,k;if(!c)return;e=b.scaleDimensions(c.getAttribute("data-w
idth"),c.getAttribute("data-height"),this.contentWidth(),c.getAttribute("data-he
ight")),d=!!(h=c.getAttribute("data-player")),d?i=this.sandbox.doc.createElement
("iframe"):(i=this.sandbox.doc.createElement("img"),h=c.getAttribute(j.retina()?
"data-image-2x":"data-image"),i.alt=c.getAttribute("data-alt"),k=this.sandbox.do
c.createElement("a"),k.href=c.getAttribute("data-href"),k.appendChild(i)),i.titl
e=c.getAttribute("data-title"),i.src=h,i.width=e.width,i.height=e.height,g=s.anc
estor("."+D,c,a),f=e.height-c.offsetHeight,c.parentNode.replaceChild(d?i:k,c),g.

style.cssText="height:"+(g.offsetHeight+f)+"px"},handleResize:function(){this.ha
ndleResize=m(function(){var a=Math.min(this.dimensions.DEFAULT_WIDTH,Math.max(th
is.dimensions.MIN_WIDTH,this.sandbox.frame.offsetWidth));if(!this.element)return
;a<this.dimensions.NARROW_WIDTH?(this.narrow=!0,r.add(this.element,"var-narrow")
):(this.narrow=!1,r.remove(this.element,"var-narrow"))},50,this),this.handleResi
ze()}}),a(N)})});
provide("tfw/widget/embed",function(a){using("tfw/widget/base","tfw/widget/syndi
catedbase","tfw/util/params","dom/classname","dom/get","util/util","util/throttl
e","util/twitter","tfw/util/data","tfw/util/tracking",function(b,c,d,e,f,g,h,i,j
,k){function p(a,b,c){var d=f.one("subject",a,"BLOCKQUOTE"),e=f.one("reply",a,"B
LOCKQUOTE"),g=d&&d.getAttribute("data-tweet-id"),h=e&&e.getAttribute("data-tweet
-id"),i={},j={};if(!g)return;i[g]={item_type:0},k.enqueue({page:"tweet",section:
"subject",component:"tweet",action:"results"},{client_version:l,widget_origin:do
cument.location.href,message:b,item_ids:[g],item_details:i},!0,c);if(!h)return;j
[h]={item_type:0},k.enqueue({page:"tweet",section:"conversation",component:"twee
t",action:"results"},{client_version:l,widget_origin:document.location.href,mess
age:b,item_ids:[h],item_details:j,associations:{4:{association_id:g,association_
type:4}}},!0,c)}function q(a,b,c){var d={};if(!a)return;d[a]={item_type:0},k.enq
ueue({page:"tweet",section:"subject",component:"rawembedcode",action:"no_results
"},{client_version:l,widget_origin:document.location.href,message:b,item_ids:[a]
,item_details:d},!0,c)}function r(a,b,c,d,e){n[a]=n[a]||[],n[a].push({s:c,f:d,r:
e,lang:b})}function s(a){if(!a)return;var b,d,e;this.a11yTitle=this._("Embedded
Tweet"),c.apply(this,[a]),b=this.params(),d=this.srcEl&&this.srcEl.getElementsBy
TagName("A"),e=d&&d[d.length-1],this.hideThread=(b.conversation||this.dataAttr("
conversation"))=="none"||~g.indexOf(this.classAttr,"tw-hide-thread"),this.hideCa
rd=(b.cards||this.dataAttr("cards"))=="hidden"||~g.indexOf(this.classAttr,"tw-hi
de-media");if((b.align||this.attr("align"))=="left"||~g.indexOf(this.classAttr,"
tw-align-left"))this.align="left";else if((b.align||this.attr("align"))=="right"
||~g.indexOf(this.classAttr,"tw-align-right"))this.align="right";else if((b.alig
n||this.attr("align"))=="center"||~g.indexOf(this.classAttr,"tw-align-center"))t
his.align="center",this.containerWidth>this.dimensions.MIN_WIDTH*(1/.7)&&this.wi
dth>this.containerWidth*.7&&(this.width=this.containerWidth*.7);this.narrow=b.na
rrow||this.width<=this.dimensions.NARROW_WIDTH,this.narrow&&this.classAttr.push(
"var-narrow"),this.tweetId=b.tweetId||e&&i.status(e.href)}var l="2.0",m="tweetem
bed",n={},o={};s.prototype=new c,g.aug(s.prototype,{renderedClassNames:"twittertweet twitter-tweet-rendered",dimensions:{DEFAULT_HEIGHT:"0",DEFAULT_WIDTH:"500"
,NARROW_WIDTH:"350",MIN_WIDTH:"220",MIN_HEIGHT:"0",WIDE_MEDIA_PADDING:32,NARROW_
MEDIA_PADDING:32},create:function(a){var b=this.sandbox.doc.createElement("div")
,d,e=this.sandbox.frame,f=e.style;b.innerHTML=a,d=b.children[0]||!1;if(!d)return
;return this.theme=="dark"&&this.classAttr.push("thm-dark"),this.linkColor&&this
.addSiteStyles(),this.augmentWidgets(d),c.retinize(d),c.constrainMedia(d,this.co
ntentWidth()),d.id=this.id,d.className+=" "+this.classAttr.join(" "),d.lang=this
.lang,twttr.widgets.load(d),this.sandbox.body.appendChild(d),f.cssText="",e.widt
h=this.width,e.height=0,f.display="block",f.border="#ddd 1px solid",f.maxWidth="
99%",f.minWidth=this.dimensions.MIN_WIDTH+"px",f.margin="10px 0",f.borderRadius=
"10px",f.borderTopColor="#eee",f.borderBottomColor="#bbb",f.boxShadow="0 1px 3px
rgba(0, 0, 0, 0.15)",this.align=="center"?(f.margin="7px auto",f.float="none"):
this.align&&(this.width==this.dimensions.DEFAULT_WIDTH&&(e.width=this.dimensions
.NARROW_WIDTH),f.float=this.align),p(d,this.partner,this.dnt),d},render:function
(a,b){var c=this,d="",e=this.tweetId,f,g,h;if(!e)return;this.hideCard&&(d+="c"),
this.hideThread&&(d+="t"),d&&(e+="-"+d),h=this.callsWhenSandboxReady(function(a)
{function d(){c.srcEl&&c.srcEl.parentNode&&c.srcEl.parentNode.removeChild(c.srcE
l),c.handleResize()}var b;c.sandbox.doc.body.style.display!=="none"&&c.sandbox.f
rame.offsetHeight&&c.element.offsetHeight?d():b=window.setInterval(function(){c.
sandbox.doc.body.style.display!=="none"&&c.sandbox.frame.offsetHeight&&c.element
.offsetHeight&&(window.clearInterval(b),d())},100)}),f=this.callsWhenSandboxRead
y(function(a,d){c.element=c.create(d),c.bindIntentHandlers(),b&&b(c.sandbox.fram
e)}),g=this.callsWhenSandboxReady(function(a){q(c.tweetId,c.partner,c.dnt)}),r(e
,this.lang,f,g,h)},augmentWidgets:function(a){var b=f.all("twitter-follow-button
",a,"A"),c,d=0;for(;c=b[d];d++)c.setAttribute("data-related",this.related),c.set

Attribute("data-partner",this.partner),c.setAttribute("data-dnt",this.dnt),c.set
Attribute("data-show-screen-name","false")},addUrlParams:function(a){var b=this,
c={related:this.related,partner:this.partner,tw_p:m};return this.addUrlParams=d(
c,function(a){var c=f.ancestor(".tweet",a,b.element);return{tw_i:c.getAttribute(
"data-tweet-id")}}),this.addUrlParams(a)},handleResize:function(){this.handleRes
ize=h(function(){var a=this,b=Math.min(this.dimensions.DEFAULT_WIDTH,Math.max(th
is.dimensions.MIN_WIDTH,this.sandbox.frame.offsetWidth));if(!this.element)return
;b<this.dimensions.NARROW_WIDTH?(this.narrow=!0,e.add(this.element,"var-narrow")
):(this.narrow=!1,e.remove(this.element,"var-narrow")),window.setTimeout(functio
n(){a.sandbox.frame.height=a.height=a.element.offsetHeight},0)},50,this),this.ha
ndleResize()}}),s.fetchAndRender=function(){var a=n,b=[],c=0,d,e;n={};if(a.keys)
b=a.keys();else for(d in a)a.hasOwnProperty(d)&&b.push(d);if(!b.length)return;k.
initPostLogging(),e=a[b[0]][0].lang,j.tweets({ids:b.sort(),lang:e,complete:funct
ion(b){var c,d,e,f,g,h,i=[];for(c in b)if(b.hasOwnProperty(c)){g=a[c]&&a[c];for(
e=0;g.length&&(f=g[e]);e++)f.s&&(f.s.call(this,b[c]),f.r&&i.push(f.r));delete a[
c]}for(e=0;h=i[e];e++)h.call(this);for(d in a)if(a.hasOwnProperty(d)){g=a[d];for
(e=0;g.length&&(f=g[e]);e++)f.f&&f.f.call(this,b[c])}k.flush()}})},b.afterLoad(s
.fetchAndRender),a(s)})});
provide("dom/textsize",function(a){function c(a,b,c){var d=[],e=0,f;for(;f=c[e];
e++)d.push(f[0]),d.push(f[1]);return a+b+d.join(":")}function d(a){var b=a||"";r
eturn b.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}var b={};a(fu
nction(a,e,f){var g=document.createElement("span"),h={},i="",j,k=0,l=0,m=[];f=f|
|[],e=e||"",i=c(a,e,f);if(b[i])return b[i];g.className=e+" twitter-measurement";
try{for(;j=f[k];k++)g.style[j[0]]=j[1]}catch(n){for(;j=f[l];l++)m.push(d(j[0])+"
:"+j[1]);g.setAttribute("style",m.join(";")+";")}return g.innerHTML=a,document.b
ody.appendChild(g),h.width=g.clientWidth||g.offsetWidth,h.height=g.clientHeight|
|g.offsetHeight,document.body.removeChild(g),delete g,b[i]=h})});
provide("tfw/widget/tweetbase",function(a){using("util/util","tfw/widget/base","
util/querystring","util/uri",function(b,c,d,e){function h(a){if(!a)return;var b;
c.apply(this,[a]),b=this.params(),this.text=b.text||this.dataAttr("text"),this.t
ext&&/\+/.test(this.text)&&!/ /.test(this.text)&&(this.text=this.text.replace(/\
+/g," ")),this.align=b.align||this.dataAttr("align")||"",this.via=b.via||this.da
taAttr("via"),this.placeid=b.placeid||this.dataAttr("placeid"),this.hashtags=b.h
ashtags||this.dataAttr("hashtags"),this.screen_name=b.screen_name||b.screenName|
|this.dataAttr("button-screen-name"),this.url=b.url||this.dataAttr("url")}var f=
document.title,g=encodeURI(location.href);h.prototype=new c,b.aug(h.prototype,{p
arameters:function(){var a={text:this.text,url:this.url,related:this.related,lan
g:this.lang,placeid:this.placeid,original_referer:location.href,id:this.id,scree
n_name:this.screen_name,hashtags:this.hashtags,dnt:this.dnt,_:+(new Date)};retur
n b.compact(a),d.encode(a)}}),a(h)})});
provide("tfw/widget/tweetbutton",function(a){using("tfw/widget/tweetbase","util/
util","util/querystring","util/uri","dom/textsize",function(b,c,d,e,f){var g=doc
ument.title,h=encodeURI(location.href),i=["vertical","horizontal","none"],j=func
tion(a){b.apply(this,[a]);var d=this.params(),f=d.count||this.dataAttr("count"),
j=d.size||this.dataAttr("size"),k=e.getScreenNameFromPage();if(d.type=="hashtag"
||~c.indexOf(this.classAttr,"twitter-hashtag-button"))this.type="hashtag";else i
f(d.type=="mention"||~c.indexOf(this.classAttr,"twitter-mention-button"))this.ty
pe="mention";this.counturl=d.counturl||this.dataAttr("counturl"),this.searchlink
=d.searchlink||this.dataAttr("searchlink"),this.button_hashtag=d.button_hashtag|
|d.hashtag||this.dataAttr("button-hashtag"),this.size=j=="large"?"l":"m",this.ty
pe?(this.count="none",k&&(this.related=this.related?k+","+this.related:k)):(this
.text=this.text||g,this.url=this.url||e.getCanonicalURL()||h,this.count=~c.index
Of(i,f)?f:"horizontal",this.count=this.count=="vertical"&&this.size=="l"?"none":
this.count,this.via=this.via||k)};j.prototype=new b,c.aug(j.prototype,{parameter
s:function(){var a={text:this.text,url:this.url,via:this.via,related:this.relate
d,count:this.count,lang:this.lang,counturl:this.counturl,searchlink:this.searchl
ink,placeid:this.placeid,original_referer:location.href,id:this.id,size:this.siz
e,type:this.type,screen_name:this.screen_name,button_hashtag:this.button_hashtag
,hashtags:this.hashtags,align:this.align,dnt:this.dnt,_:+(new Date)};return c.co
mpact(a),d.encode(a)},height:function(){return this.count=="vertical"?62:this.si

ze=="m"?20:28},width:function(){var a={ver:8,cnt:14,btn:24,xlcnt:18,xlbtn:38},b=
this.count=="vertical",d=this.type=="hashtag"?"Tweet %{hashtag}":this.type=="men
tion"?"Tweet to %{name}":"Tweet",e=this._(d,{name:"@"+this.screen_name,hashtag:"
#"+this.button_hashtag}),g=this._("K"),h=this._("100K+"),i=(b?"8888":"88888")+g,
j=0,k=0,l=0,m=0,n=this.styles.base,o=n;return~c.indexOf(["ja","ko"],this.lang)?i
+=this._("10k unit"):i=i.length>h.length?i:h,b?(o=n.concat(this.styles.vbubble),
m=a.ver,l=a.btn):this.size=="l"?(n=o=n.concat(this.styles.large),l=a.xlbtn,m=a.x
lcnt):(l=a.btn,m=a.cnt),this.count!="none"&&(k=f(i,"",o).width+m),j=f(e,"",n.con
cat(this.styles.button)).width+l,b?j>k?j:k:this.calculatedWidth=j+k},render:func
tion(a,b){var c=twttr.widgets.config.assetUrl()+"/widgets/tweet_button.136314893
9.html#"+this.parameters();this.count&&this.classAttr.push("twitter-count-"+this
.count),this.element=this.create(c,this.dimensions(),{title:this._("Twitter Twee
t Button")}),b&&b(this.element)}}),a(j)})});
provide("tfw/widget/follow",function(a){using("util/util","tfw/widget/base","uti
l/querystring","util/uri","util/twitter","dom/textsize",function(b,c,d,e,f,g){fu
nction h(a){if(!a)return;var b,d,e,g,h;c.apply(this,[a]),b=this.params(),d=b.siz
e||this.dataAttr("size"),e=b.showScreenName||this.dataAttr("show-screen-name"),h
=b.count||this.dataAttr("count"),this.classAttr.push("twitter-follow-button"),th
is.showScreenName=e!="false",this.showCount=b.showCount!==!1&&this.dataAttr("sho
w-count")!="false",h=="none"&&(this.showCount=!1),this.explicitWidth=b.width||th
is.dataAttr("width")||"",this.screenName=b.screen_name||b.screenName||f.screenNa
me(this.attr("href")),this.preview=b.preview||this.dataAttr("preview")||"",this.
align=b.align||this.dataAttr("align")||"",this.size=d=="large"?"l":"m"}h.prototy
pe=new c,b.aug(h.prototype,{parameters:function(){var a={screen_name:this.screen
Name,lang:this.lang,show_count:this.showCount,show_screen_name:this.showScreenNa
me,align:this.align,id:this.id,preview:this.preview,size:this.size,dnt:this.dnt,
_:+(new Date)};return b.compact(a),d.encode(a)},render:function(a,b){if(!this.sc
reenName)return;var c=twttr.widgets.config.assetUrl()+"/widgets/follow_button.13
63148939.html#"+this.parameters();this.element=this.create(c,this.dimensions(),{
title:this._("Twitter Follow Button")}),b&&b(this.element)},width:function(){if(
this.calculatedWidth)return this.calculatedWidth;if(this.explicitWidth)return th
is.explicitWidth;var a={cnt:13,btn:24,xlcnt:22,xlbtn:38},c=this.showScreenName?"
Follow %{screen_name}":"Follow",d=this._(c,{screen_name:"@"+this.screenName}),e=
~b.indexOf(["ja","ko"],this.lang)?this._("10k unit"):this._("M"),f=this._("%{fol
lowers_count} followers",{followers_count:"88888"+e}),h=0,i=0,j,k,l=this.styles.
base;return this.size=="l"?(l=l.concat(this.styles.large),j=a.xlbtn,k=a.xlcnt):(
j=a.btn,k=a.cnt),this.showCount&&(i=g(f,"",l).width+k),h=g(d,"",l.concat(this.st
yles.button)).width+j,this.calculatedWidth=h+i}}),a(h)})});
!function(){function a(a){return(a||!/^http\:$/.test(window.location.protocol))&
&!twttr.ignoreSSL?"https":"http"}window.twttr=window.twttr||{},twttr.host=twttr.
host||"platform.twitter.com";if(twttr.widgets&&twttr.widgets.loaded)return twttr
.widgets.load(),!1;if(twttr.init)return!1;twttr.init=!0,twttr._e=twttr._e||[],tw
ttr.ready=twttr.ready||function(a){twttr.widgets&&twttr.widgets.loaded?a(twttr):
twttr._e.push(a)},using.path.length||(using.path=a()+"://"+twttr.host+"/js"),twt
tr.ignoreSSL=twttr.ignoreSSL||!1;var b=[];twttr.events={bind:function(a,c){retur
n b.push([a,c])}},using("util/domready",function(c){c(function(){using("tfw/widg
et/base","tfw/widget/follow","tfw/widget/tweetbutton","tfw/widget/embed","tfw/wi
dget/timeline","tfw/widget/intent","tfw/util/globals","util/events","util/util",
function(c,d,e,f,g,h,i,j,k){function q(b){var c=twttr.host;return a(b)=="https"&
&twttr.secureHost&&(c=twttr.secureHost),a(b)+"://"+c}function r(){using("tfw/hub
/client",function(a){twttr.events.hub=a.init(n),a.init(n,!0)})}var l,m,n={widget
s:{"a.twitter-share-button":e,"a.twitter-mention-button":e,"a.twitter-hashtag-bu
tton":e,"a.twitter-follow-button":d,"blockquote.twitter-tweet":f,"a.twitter-time
line":g,body:h}},o=twttr.events&&twttr.events.hub?twttr.events:{},p;i.init(),n.a
ssetUrl=q,twttr.widgets=twttr.widgets||{},k.aug(twttr.widgets,{config:{assetUrl:
q},load:function(a){c.init(n),c.embed(a),twttr.widgets.loaded=!0},createShareBut
ton:function(a,b,c,d){if(!a||!b)return c&&c(!1);d=k.aug({},d||{},{url:a,targetEl
:b}),(new e(d)).render(n,c)},createHashtagButton:function(a,b,c,d){if(!a||!b)ret
urn d&&d(!1);c=k.aug({},c||{},{hashtag:a,targetEl:b,type:"hashtag"}),(new e(c)).
render(n,d)},createMentionButton:function(a,b,c,d){if(!a||!b)return c&&c(!1);d=k

.aug({},d||{},{screenName:a,targetEl:b,type:"mention"}),(new e(d)).render(n,c)},
createFollowButton:function(a,b,c,e){if(!a||!b)return c&&c(!1);e=k.aug({},e||{},
{screenName:a,targetEl:b}),(new d(e)).render(n,c)},createTweet:function(a,b,c,d)
{if(!a||!b)return c&&c(!1);d=k.aug({},d||{},{tweetId:a,targetEl:b}),(new f(d)).r
ender(n,c),f.fetchAndRender()},createTimeline:function(a,b,c,d){if(!a||!b)return
c&&c(!1);d=k.aug({},d||{},{widgetId:a,targetEl:b}),(new g(d)).render(n,c)}}),k.
aug(twttr.events,o,j.Emitter),p=twttr.events.bind,twttr.events.bind=function(a,b
){r(),this.bind=p,this.bind(a,b)};for(l=0;m=b[l];l++)twttr.events.bind(m[0],m[1]
);for(l=0;m=twttr._e[l];l++)m(twttr);twttr.ready=function(a){a(twttr)},/twitter\
.com(\:\d+)?$/.test(document.location.host)&&(twttr.widgets.createTimelinePrevie
w=function(a,b,c){if(!n||!b)return c&&c(!1);(new g({previewParams:a,targetEl:b,l
inkColor:a.link_color,theme:a.theme,height:a.height})).render(n,c)}),twttr.widge
ts.createTweetEmbed=twttr.widgets.createTweet,twttr.widgets.load()})})})}()});<!
DOCTYPE html>
<!-- saved from url=(0623)http://platform.twitter.com/widgets/tweet_button.13631
48939.html#_=1363988056278&count=horizontal&id=twitter-widget-0&lang=es&original
_referer=http%3A%2F%2Fwww.monografias.com%2Ftrabajos88%2Ftipos-procesos-nueva-le
y-procesal-del-trabajo-na-29497%2Ftipos-procesos-nueva-ley-procesal-del-trabajona-29497.shtml&size=m&text=Tipos%20de%20procesos%20en%20la%20Nueva%20Ley%20Proce
sal%20del%20Trabajo%20N%C2%B0%2029497%20-%20Monografias.com&url=http%3A%2F%2Fwww
.monografias.com%2Ftrabajos88%2Ftipos-procesos-nueva-ley-procesal-del-trabajo-na
-29497%2Ftipos-procesos-nueva-ley-procesal-del-trabajo-na-29497.shtml&via=monogr
afias_com -->
<html lang="es" class=" regular"><head><meta http-equiv="Content-Type" content="
text/html; charset=UTF-8"><meta charset="utf-8"><link rel="dns-prefetch" href="h
ttp://twitter.com/"><title>Tweet Button</title><style type="text/css">html{margi
n:0;padding:0;font:normal normal normal 11px/18px 'Helvetica Neue',Arial,sans-se
rif;color:#333;-webkit-user-select:none;-ms-user-select:none;-moz-user-select:no
ne;-o-user-select:none;user-select:none;}body{margin:0;padding:0;background:tran
sparent;visibility:hidden;}a{outline:none;text-decoration:none;}body.ready{visib
ility:visible;}body.rtl{direction:rtl;}#widget{white-space:nowrap;overflow:hidde
n;text-align:left;}.rtl #widget{text-align:right;}.btn-o,.count-o,.btn,.btn .lab
el,#count{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom
:1;*display:inline;}.right #widget{text-align:right;}.left #widget{text-align:le
ft;}.btn-o{max-width:100%;}.btn{position:relative;background-color:#f8f8f8;backg
round-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#dedede))
;background-image:-moz-linear-gradient(top,#fff,#dedede);background-image:-o-lin
ear-gradient(top,#fff,#dedede);background-image:-ms-linear-gradient(top,#fff,#de
dede);background-image:linear-gradient(top,#fff,#dedede);border:#ccc solid 1px;moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;color:#333;fon
t-weight:bold;text-shadow:0 1px 0 rgba(255,255,255,.5);-webkit-user-select:none;
-moz-user-select:none;-o-user-select:none;user-select:none;cursor:pointer;height
:18px;max-width:98%;overflow:hidden;}.btn:focus,.btn:hover,.btn:active{border-co
lor:#bbb;background-color:#f8f8f8;background-image:-webkit-gradient(linear,left
top,left bottom,from(#f8f8f8),to(#d9d9d9));background-image:-moz-linear-gradient
(top,#f8f8f8,#d9d9d9);background-image:-o-linear-gradient(top,#f8f8f8,#d9d9d9);b
ackground-image:-ms-linear-gradient(top,#f8f8f8,#d9d9d9);background-image:linear
-gradient(top,#f8f8f8,#d9d9d9);-webkit-box-shadow:none;-moz-box-shadow:none;boxshadow:none;}.btn:active{background-color:#efefef;-webkit-box-shadow:inset 0 3px
5px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 3px 5px rgba(0,0,0,0.1);box-shadow:
inset 0 3px 5px rgba(0,0,0,0.1);}.xl .btn:active{-webkit-box-shadow:inset 0 3px
7px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 3px 7px rgba(0,0,0,0.1);box-shadow:i
nset 0 3px 7px rgba(0,0,0,0.1);}.btn i{position:absolute;top:50%;left:2px;margin
-top:-5px;width:16px;height:13px;background:transparent url(/widgets/images/btn.
27237bab4db188ca749164efd38861b0.png) 0 0 no-repeat;background-image:url(data:im
age/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAoCAYAAABq13MpAAAGcklEQVRYw+2YXUyTV
xjHz4vJLiZGd7MtXi2LkZtdELM7lyzOG7Nk2RJvl8iujBiNV2JcMA0fwqCFEGCAfJRC+SyltqWFgnwUl
IKAWB3yOVrAttQWC1ZCOi6ePc8LL74tVD6ly2KTf87J6Tnv+3uf8zzP+WAAwEhMIj8h1MViEs0Jlqi+w
e5oJFjGCX3D9X+fmKTmq/f/rzkRlX5fzkmNPhLVqW2DQ1Ify9eFAZ8kafUsURMX+qCo1BYry3oILKcfm
LQb2N3Wzqhk48xn6YbLuwJO1cQeydAvURkWONtk5UoGgKsaXRPWo3LarVHSJvkRmXHm+6pHV3h4YdDp0

gE7D5XUJPo6QyzLfwKscgZY1UtgChuwkjH4tOhpQPp4Nn430GeU/TcJ4sif5iV2V/NL6P/H81oTOIUVu
PsO4AyeNVG9ehw4xTP4oubZ268VFiP2jd4Y9Hufw8TKJoAgufT2RZZikJ8s7JMzxTQw1QKwhtdrZY0Li
kd9Azjm1G6gpcOz8VzdFHC1E8AV9gKXYdCI3eWc9q96Tj0DnHEBuObXa6J60yvgtC740Tw3jf0Sgtzj8
9JhK6tyAKt2Ag9f+AxY8SgPyQMLUs5hd/hut/5MH3mp3z3H6eeBa7ADV/4UuNxO4DINw1GyZklMw/MhT
ut8BywCj2mb9wvAQdBN0z5ldJ1zlbemygusdn5NVBeA8b/Tart/D8CMyVrjjteNeo81v1rljF7gdC7gV
NPAKUeAdwuaAb17MzS6yTdGmzPoWWJLXLG8Go9We1aDLCtWnRskA27zXqCfuP0Xj9ZNBHgwwQWE6acP4
Nu9m6FxZn7tmbWEg2Zpg670U1rXUpB1xVbWOsjKF/YCTQHU5X5rjmn3+IP8djthMJaNe+6EhUbFmub8j
efaPZ5NbtHk8TuX/1HsEZiXetJz5rc+11BMxw7Bsc+3bS99oUH/bgGRYCL/o93Hp7gKO7B6zzqwF342L
7jWgaP3A03jzxrGTJzm5dausIVrlP/tU22KD+FhFJ1djjfma4/mbdf6vbZrgz6bbOTN6IvFgGU9cvcLL
Ojqi6WA5bp10RbTuRDe4vhR1594bTT74aA3ghEVJxL575cHBLuhC3rr+bPN06ajOkdgS4tj26UB79w6A
9sO+oMpKk0j5zKbOrksk48reLiW6mjFE0Oj1U+2elbK7P7nNCNh0+dhQZOLSa0u3U8dttmTOvsKv5DQU
o2gx0wLqz88eu2RTbwZxX412y1ehwnN1mES1sE6RdKjkneaTg8b+kD0Efoj9P8WWiKRbHnmo/bExMQbW
EqwjBPawvU/VOjk5GQ9gmxagdLS0qzZ2dmQm5sLWVlZkJ6e3pmamjqD5eWIQ8vlcjtBpaSkyAUrIlxsQ
UEBKJVKqK6uhsrKSigrK4Pi4uLA48eP4yMO3dfXZyovLweCzMjIWCT4e/fuySsqKkCtVkNjYyNf1tXVw
djY2K7PiB8EurS01FpTUwO1tbVA8AgM2MZDErAgsvgez4gHD22325UqlWqVrEmqr6/nJVhZsDSW/v288
NatW++9sFkPcjm6po9EdcFdqbx9+3Zs0LbUYrGMazSaVbFlxcKPgqGhIfNegfGlsRjwS1SGA6bAz8/P5
2eZRHV0Vyu5KyUA9IIrQYMGBwfT9Xr9kti6YivrdLr9nBEZBvHNvLw8ykIEvunCRiaTJRQVFQG5aUNDA
y+qU/CTuyLwWyyNm86IDoejsaOjwxPqFkaj0b+8vLyvMyIaJV6hUPAxk5OTA2g5DcJvuAvOZD1lqtB30
wxTbLW1tfEXNhvTkpSUJM/MzPQJKY6+UhjU3d3tWgfe75HrVE9PzxzFCr2jsLAQpFIppdlh/ABJVVXVE
CWCrWYZPcAfesPEnxHRyube3l4b5mAbWsU2ir/FxcUDOyOiv8ahpb0UN0L6pJRaUlIC5BY0A2TVUGgyI
I5xRuSM6Ha7LyJkgMDEuV+YfnG7WDQzDx48sERqwxTtdDrNFB9bwYUTBSNO+p2I7fImJyfPoF8PNTc37
wic+hgMhqALm0isaNEIY6KVdSfQ5BoTExOq/8J++ioFOAV7S0tLWItTOyWF0AubiO0fMOjO42JlwgAMh
FvMMJNteWFzqKC0j8Cc3Il7cR/t0SnVUZCFLiaYk1empqbCXtgctoUTcO+iQ5eYRUuv0EJCOZhAtVrta
ldXl2dkZGTbC5tIuMa+L2z+BexZXK+OBaruAAAAAElFTkSuQmCC);*background-image:url(/widg
ets/images/btn.27237bab4db188ca749164efd38861b0.png);_background-image:url(/widg
ets/images/btn.80461603b10bcad420939ef5204c466a.gif);}.btn .label{padding:0 3px
0 19px;white-space:nowrap;}.btn .label b{font-weight:bold;white-space:nowrap;}.r
tl .btn .label{padding:0 19px 0 3px;}.rtl .btn i{left:auto;right:2px;}.rtl .btn
.label b{display:inline-block;direction:ltr;}.xl{font-size:13px;line-height:26px
;}.xl .btn{-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;he
ight:26px;}.xl .btn i{background-position:-24px 0;width:21px;height:16px;left:4p
x;margin-top:-6px;}.xl .btn .label{padding:0 7px 0 29px;}.xl .rtl .btn .label{pa
dding:0 29px 0 7px;}.xl .rtl .btn i{left:auto;right:6px;}@media(-webkit-min-devi
ce-pixel-ratio:2){.btn i{background-image:url(data:image/png;base64,iVBORw0KGgoA
AAANSUhEUgAAAFoAAABQCAYAAACZM2JkAAANzElEQVR42u1cW0wbVxo+6q72ZVkp2pVWbV/KQ5SX7gPa
vKyq1Za8pauVWlV5W6nK63YViUqVyjU4QEgaIA4kIdeNIVzM3RBIQiHgBCeljekaEgEFmpiEgBNMcDCh
TuJoz/7fmZnWNraZMbZxwUi/8GVmPOc73/n+y5lzGOecRctYpjGVZdbtJdNJZkyP5vU3ypjOsI1l1WeQ
mcjMwjKNBvr/UTgs/N77XSy7Li3iG8EPZzdyltfK2X4T/W/jLKeZs6wGl+8N4TXLpBuN8Lc03Rd+i+5t
XdfIJuLkNLrYfmrPgQ7OCjol07VTG1s4y26wKW35uUOM9kCS+VzQqCNQbFpvTFw8p4nOo5s43MfZ0Vuc
lX/L2bFvOCu9wVnRVQl0XBugoyPyTea4MBEAZTcYIgeZMMkn0hzqoTYNcnbKxtmZO5KdHOKsbIDadwWA
u0T7chq5OL7gEtr3ZlCgf13QMcAKujjLbbFpYRvLbjKx4q84O0E/bJjirOYhZ3WzZI84uzjN2dkxzvRf
c3FMcQ//3fGvJ7vuLdS+U95XETi8ojvcTemsuJuzQmoT7lErgXKN6QQYEYbu/T/fU3tmOGtwcNb0RDK8
rpmWQAeh0L4v+/jvzwzZHSve1r8brZ/R76atZnSZhbPjVomVuS2ucPrjp8kEHjt9RwK3eYGzlkV/a5yn
G3pANzsh2YVJ6pTviAndGTFlc9GVDFb5X4l5B2lUYdRpIRCxklXQyLxoJ2CpDa2Lq63lKbXvMWfV96ld
1LaqH/iOtgfL7CS172C3LSij/1A1uiTYeHaUsyNmSWezGkzhWEc3kyFAq58jkJ+uBlkxfIdOaHIKxr9d
NYrhvDdweEXT/lwzVCIAABNPDUvDXwzx+gwVo2GbYGn1Pbr/heAg+wG+IBk6hDrmjcqhka/nlnbTtbav
AnrX5RmnAKLhscQ6DHdICRwaHF2QCOKPFZZSZvghOJNDAF72/fNxOhcatieWjN4/OJMvQAYARiLCOSJQ
6XXJiWU32OHkQgJd2JnOTo9IbF0LZF9rdvJ3Lz+Zm/e8ttB1zgVldOM9d58AWhnu0NfKYYndBy7JEYTw
pgbhWXOb09+9OGxmtTPqQIbR9WWQ/x0HZ7gnpfGR12+Iw4dADqDdiCIAeFa9PlBS3qm8+YE4FudpAZo6
VW4fQE4JCvRD98uSDwcWHT+zD0wgwa+i4VNJ3rZ0ALrDRXSBKAIhDjQdsqEWaHKQ9Lc7TvFv2r7bT+2B
jBMsPzcmOTk4MDA896cw1EyRg/7tU7c6hKPTAjKMHCT96QNB9gP6V2UW94f9jx0ppqde/+EuAw6Gn/9e
Ah2hG0I4vIfUqAWaOi1uScahq6lPPK+7d3QvLq9yYNDS2odSNHHCKkkKWA7yFF2WQjl8rxHolPoH3pD3
o7x4o+T6SFjg4NAgLQAdoRskA6/V6jPZjtYHy/HL5ky631RaV3b1OZ1BJQCfgeHQb7AXUcOZu1KsjA5A
+KYR6J2XHrrWBPpf16cnhEwI8J6qZ6lao2t+eG3WES+g/2K4+bFgJiIHAKomclDiY+i5mmgj4Px/9Dx6
uCbQcyuvqt9qf+LRwlBNRg62/O7TnjjWKPb+1jD+SkhAqDg4mkad9OmtuetrAo0bs8y/tKaYFr2xADql
+TH064s4Ap2279sFuwBZKzsjMRoJFsfzw2qAhqc0zr94bfnE+nwmpd0VVcD33V600/X/GufKW+fOay5X
zEEm29H5eDlcbhD4wfa/dU47RDqtxNTRYHPbghcRwAaUOJGUmEGcmAJNjrVs9Nl4uEx31Qd/qrG9J4L1
xidRc4p5w+4pudEbUU/Wl40vj5dNesZTOlzeWACd0jbvhY8LGwUF+bCwbHRpPFqM3tnrQsjTGSyIj5el
1o5OstoHMXOKecNLU2slYsE+RCHEbHG+su7sW3KtB+S3Op955Lx/z0bOkJQOzX4q4mSEblrT6rW0mRIi
NUQK9cVuOWcnwL3WHd1Ly5p1maIXRDFySrrR01F6aZRGl9Ep7Wijx6qGSCG/yBuwv//Paw8HU+oeeEW2

qEGv0TFjS95BRDEbKRmBo7R99qVtx1dLy9ECumzix/HAKl1IoKX5PmUyleyLer2YlkE9+ss+SklHpHRb
ZSLzye3nMwgR5eG0PYEmWf1G6XojERlk1W1U6gJpmMcT812ozmEe7Ei/VJ1DBKKC0dBzMManTPhmAs5o
oxx6Ls+2OJXS8tgbaSIjg2zWUolUEhWEXnu/mn72+fttE/3v1E8uiLoHSqBhoo+3up55wAwwRGGLXGtO
STSQMXHB8pr17GC3i5V/IxEItQ0tmkzh4YVpz12tIPtq9HbZaSlgmTH822df2fJGf5zaZ1uxK4Z4FJ/P
v/ifxfd4+fy0hAAVjwgoz19k1btYllGqOaP2fLhXmkdExU5NsUm2XQNupyyJ5khq6oEfvCkz8lwAiKHM
KB+/PeEYrDOlsqIug5iYxXwhHg0AwJggrn+kGmQA7COJnZGWEX7xTxGFcXwYYXqk/kiPd/U+cQpdVgEw
/A1G8pj79aAPqQrXI4mbFWhldH4ROAoBXvvcK9uF6Zd39w2THA7LckifWRb8fI0vwOuWxM0MtG9VcrcM
WKdKSdTLSUjUIqetAHRi+IwkCEmgk0AnLQl0Eugk0EkQkkAngU5aEugk0Emgo3exzMzM1Ozs7L1kOhi9
T0+CHAC0TqfbRuBEVKWSzzXk5uby/fv3c3rP8/PzeV5eHqfPXVlZWT8tPMJrMnOkv/WLB5pA0uXk5NgA
mlaQ6VxbQUEBP3LkCD927Bg/fvw4r6io4GVlZby4uFiAjmuTueSOMG9ZRhcWFg4UFRWBkTYtbCPWmg4d
OsRPnjzJq6qqeF1dHTcajby+vp7X1tby8+fP8/Lyco5jDh8+jOMm79+/X0udUQGp2XJA6/V6ARZYSWD7
DfcwbE4FeGfPnhXgtra28ra2Nj9rbm4WgBsMBmHojMrKSjA9Y0sy+uLFi0tgIxhYWloqdJaYbQrHOpKL
DIDW0NAQFGTF8B2spaVFMJ6Aj/k6w4QF+urVq04A0dTUJFiH4Q4pkR2aIVgEceLEidLq6uqwIAcCPjEx
EZd1hgkLtN1u7wPQvsP99OnTgt1wdDLgdgLcQLKSQYxPp2PM0GI1IMNw/TiuM0xMoN1ud8nNmzcdvuxr
bGzkJCn81KlT/OjRoyKCAOiIIsh5Ck2HbKgFGp0Sx3WGCesM3Waz2dHR0eENHO4AHAy/cOGCAB2hG0I4
vIfUqAUanbblExZi7Eg44BRnBtDBTBheq9VnmMlkWv4lgoRcAXJJZkKyBZMl9KNwWXJQoG/cuDEBxmkF
T63hmn19fY54AgQgtCZggYaSAiVkLsglZBOSCTtw4IDIgpGIKXmH0iHwZXRO8B1oVlZWqkk2PLEAWXGw
o6Oj8VxniGzXRUAY1nG+DmEucgVEYZBN5Aww+Cf4rYMHD4q8g8C1oQSB46lDQu9Ag7h2fn7eGqjRUWR0
XNcZIiqC80aISgCYtDIbjASDATAkVZFKEAam+C2AjlIDMl8ke/TeTqRtpe8/882wV60zfPHihWVoaGjm
0qVLUQWcrhnXdYbIPMFAMA+Aox6jpbQAVsLh19TUCGBDySF8GiQXWS9yCvghOfO1hV1n2NXV5UA6rcTU
0bD29navx+OJ6zpDAqgEAICJyAcw/DHESUoy1Dg/sBTnq5FSJfNFh6BjCOiRubm54DvQ+Nzge8gMcVK0
9PrOnTtxX2c4ODiYD5DRBsT6KC0APDgxAtsOJxfqXHJ26WfOnNEUuioJ2eXLl+eIVKF3oPFdZ0hOazxa
jKZIY6PWGe4hoLy+QxwEghz4lG7tFCXoAyWFGPkBjtVKNBy/5g40gSuYnE6ntb+/37UekKl3PdD8Dapr
pMEvBDIOLPct3YLhPhMUZnqtJzZ3wNFpbS8c5Jo70IRawbSwsGDt6elZ1vqjiF7QWRu1zpBATIVfoL/l
QNZBFlFFRDQBZ6lMUCA+RpSCTsD3WttMvm3tHWgCbWBg4P1r164N4mQMOy3DCB2ztLS0oesMiak6koAV
ki5nsHtXMl3ot1IvR6iGSAUdAHZqBbqzszP0DjTyfJ9OMWiWPKXFS0pKOJyC4lTU/JjVap2R5WJD1xkS
cB+DmYgc1PgbhekAWCuxlPN7e3vD70BDoKZhHk/OakS2A5CV6Sk1Pww9p5AmkdYZ7qV7fwUJCBUHRzvz
vXXr1nVV6wynp6c/J23tJ7lYABMwrMKx4cqVKx4kN9DxBFxnmHb79m17NMPUtRyhw+FYcweaVesMMfzB
0LGxsamRkRG7YlNTU+P4XJaHhFxn6LsDDcLLWIMs67OmHWg2zTpD3x1o4DdiCTJGDHIPTTvQbELTj9Pf
5OTkeLTrNz51di+qn1v+2TsK3yYRwsXKKcolht1bHmhy2J8iTo7FpAYSovXsQLPp5AMaGm1GI/tFDX9d
O9BsMhP1m9nZWVsk5YRQJj+jom4Hmi00E+1Xv0H8HwWQte1As4VM7EAzPDw8ham1SPUaEUwkO9BsCcMc
YH5+vr64uNiF51KUyQ0tACM8pOx5XTvQbCrD7Iny/AUZZqhFzRm1Z/nRYVGx0zK5YbFYnD7Z8Lp3oNk0
hkeKi4qKDKgzA1w8GgCAlRlttSADYJ9iWXIHmlA70KD4j9Cut7cXdWmvGoBRiUSNx+12J3egiXQHGoAH
hkJrAwtlAVXI5A40yR1okhbS/g/H5BFic8lpAQAAAABJRU5ErkJggg==);background-size:45px 4
0px;margin-top:-6px;}.xl .btn i{margin-top:-7px;left:4px;}.xl .rtl .btn i{left:a
uto;right:3px;}.xl .btn .label{top:-1.5px;}}.aria{position:absolute;left:-999em;
}.rtl .aria{left:auto;right:-999em;}.following .btn{color:#888;background:#eee;b
order:#ccc solid 1px;}.following .btn:active,.following .btn:hover{border:#bbb s
olid 1px;}.following .btn i{background-position:0 -20px;}.xl .following .btn i{b
ackground-position:-25px -25px;}.btn:focus,.following .btn:focus{border-color:#0
089CB;}.count-o{position:relative;background:#fff;border:#bbb solid 1px;-moz-bor
der-radius:3px;-webkit-border-radius:3px;border-radius:3px;visibility:hidden;min
-height:18px;_height:18px;min-width:15px;_width:15px;}#count{white-space:nowrap;
text-align:center;color:#333;}#count:hover,#count:focus{color:#333;text-decorati
on:underline;}.ncount .count-o{display:none;}.count-ready .count-o{visibility:vi
sible;}.count-o i,.count-o u{position:absolute;zoom:1;line-height:0;width:0;heig
ht:0;left:0;top:50%;margin:-4px 0 0 -4px;border:4px transparent solid;_border-co
lor:pink;_filter:chroma(color=pink);border-right-color:#aaa;border-left:0;}.coun
t-o u{margin-left:-3px;border-right-color:#fff;}.rtl .count-o i,.rtl .count-o u{
left:auto;right:0;margin:-4px -4px 0 0;border:4px transparent solid;_border-righ
t-color:pink;border-left-color:#aaa;border-right:0;}.rtl .count-o u{margin-right
:-3px;border-left-color:#fff;}.following .count-o i{border-right-color:#bbb;}.fo
llowing.rtl .count-o i{border-left-color:#bbb;}.following .count-o{background:#f
9f9f9;border-color:#ccc;}.following #count{color:#666;}.hcount .count-o{margin:0
0 0 5px;}.hcount.rtl .count-o{margin:0 5px 0 0;}.hcount #count{padding:0 3px;}.
xl .count-o{-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;_
line-height:26px;margin:0 0 0 6px;}.xl .rtl .count-o{margin:0 6px 0 0;}.xl .coun
t-o i,.xl .count-o u{margin:-5px 0 0 -5px;border-width:5px 5px 5px 0;}.xl .count
-o u{margin-left:-4px;}.xl .rtl .count-o i,.xl .rtl .count-o u{margin:-5px -5px
0 0;border-width:5px 0 5px 5px;}.xl .rtl .count-o u{margin-right:-4px;}.xl #coun

t{padding:0 5px;*line-height:26px;}.vcount #widget{width:100%;_width:97%;padding


-bottom:5px;}.vcount .btn-o{position:absolute;margin-top:42px;left:0;right:0;wid
th:100%;}.vcount .btn{display:block;margin:0 auto;}.vcount .count-o{display:bloc
k;padding:0 5px;}.vcount .count-o i,.rtl.vcount .count-o i,.vcount .count-o u,.r
tl.vcount .count-o u{line-height:0;top:auto;left:50%;bottom:0;right:auto;margin:
0 0 -4px -4px;border:4px transparent solid;_border-color:pink;border-top-color:#
aaa;border-bottom:0;}.rtl.vcount .count-o u,.vcount .count-o u{margin-bottom:-3p
x;border-top-color:#fff;}.vcount #count{font-size:16px;width:100%;height:34px;li
ne-height:34px;}@media(min-width:0){.btn,.hcount .count-o{-moz-box-sizing:border
-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-b
ox;height:20px;max-width:100%;}.xl .btn,.xl .hcount .count-o{height:28px;}}</sty
le><!--[if lte IE 9]><style type="text/css">.btn{filter:progid:DXImageTransform.
Microsoft.gradient(startColorstr='#ffffff',endColorstr='#dedede');-ms-filter:"pr
ogid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',endColorstr='#d
edede')";}.btn:hover,.btn:focus{filter:progid:DXImageTransform.Microsoft.gradien
t(startColorstr='#f8f8f8',endColorstr='#d9d9d9');-ms-filter:"progid:DXImageTrans
form.Microsoft.gradient(startColorstr='#f8f8f8',endColorstr='#d9d9d9')";}.btn:ac
tive{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f8f8f8',e
ndColorstr='#d9d9d9');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(sta
rtColorstr='#f8f8f8',endColorstr='#d9d9d9')";}.btn i{_background-image:url(/widg
ets/images/btn.80461603b10bcad420939ef5204c466a.gif);}</style><![endif]--></head
><body class=" hcount ltr ready count-ready"><div id="widget"><div class="btn-o"
><a href="https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Fwww.mon
ografias.com%2Ftrabajos88%2Ftipos-procesos-nueva-ley-procesal-del-trabajo-na-294
97%2Ftipos-procesos-nueva-ley-procesal-del-trabajo-na-29497.shtml&text=Tipos%20d
e%20procesos%20en%20la%20Nueva%20Ley%20Procesal%20del%20Trabajo%20N%C2%B0%202949
7%20-%20Monografias.com&tw_p=tweetbutton&url=http%3A%2F%2Fwww.monografias.com%2F
trabajos88%2Ftipos-procesos-nueva-ley-procesal-del-trabajo-na-29497%2Ftipos-proc
esos-nueva-ley-procesal-del-trabajo-na-29497.shtml&via=monografias_com" class="b
tn" id="b" target="_blank"><i></i><span class="label" id="l">Twittear</span></a>
</div><div class="count-o enabled" id="c"><i></i><u></u><a href="http://twitter.
com/search?q=http%3A%2F%2Fwww.monografias.com%2Ftrabajos88%2Ftipos-procesos-nuev
a-ley-procesal-del-trabajo-na-29497%2Ftipos-procesos-nueva-ley-procesal-del-trab
ajo-na-29497.shtml" id="count" target="_blank">0</a></div></div><script type="te
xt/javascript" charset="utf-8">document.domain = 'twitter.com';</script><script
type="text/javascript">function _(e,t){return e=twttr.lang&&i18n[twttr.lang]&&i1
8n[twttr.lang][e]||e,t?e.replace(/\%\{([a-z0-9_]+)\}/gi,function(e,n){return t[n
]||e}):e}window.twttr=window.twttr||{};var i18n={ar:{"%{followers_count} followe
rs":" %{followers_count}","%{name} on Twitter":"%{name}
en_name}":" %{screen_name}",K:" ",M:" ","This page has been shared %{
g %{name} on Twitter":" %{name} ",ltr:"rtl"},da:{"%{followe
ame} on Twitter":"%{name} p Twitter",",":".",".":",","100K+":"100K+","10M+":"10M+"
,"10k unit":"10k enhed",Follow:"Flg","Follow %{name} on Twitter":"Flg %{name} p Twitte
r","Follow %{screen_name}":"Flg %{screen_name}",K:"K",M:"M","This page has been sh
ared %{tweets} times. View these Tweets.":"Denne side er blevet delt %{tweets} g
ange. Vis disse tweets.",Tweet:"Tweet","Tweet %{hashtag}":"Tweet %{hashtag}","Tw
eet to %{name}":"Tweet til %{name}","You are following %{name} on Twitter":"Du flg
er %{name} p Twitter",ltr:"ltr"},de:{"%{followers_count} followers":"%{followers_c
ount} Follower","%{name} on Twitter":"%{name} auf Twitter",",":",",".":".","100K
+":"100Tsd+","10M+":"10M+","10k unit":"10tsd-Einheit",Follow:"Folgen","Follow %{
name} on Twitter":"Folge %{name} auf Twitter.","Follow %{screen_name}":"%{screen
_name} folgen",K:"Tsd",M:"M","This page has been shared %{tweets} times. View th
ese Tweets.":"Diese Seite wurde bisher %{tweets} mal geteilt. Diese Tweets anzei
gen.",Tweet:"Twittern","Tweet %{hashtag}":"Tweet %{hashtag}","Tweet to %{name}":
"Tweet an %{name}","You are following %{name} on Twitter":"Du folgst %{name} auf
Twitter.",ltr:"ltr"},es:{"%{followers_count} followers":"%{followers_count} seg
uidores","%{name} on Twitter":"%{name} en Twitter",",":",",".":".","100K+":"100K
+","10M+":"10M+","10k unit":"10k unidad",Follow:"Seguir","Follow %{name} on Twit
ter":"Sigue a %{name} en Twitter","Follow %{screen_name}":"Seguir a %{screen_nam
e}",K:"K",M:"M","This page has been shared %{tweets} times. View these Tweets.":

"Esta pgina ha sido compartida %{tweets} veces. Ver estos Tweets.",Tweet:"Twittear


","Tweet %{hashtag}":"Twittear %{hashtag}","Tweet to %{name}":"Twittear a %{name
}","You are following %{name} on Twitter":"Ests siguiendo a %{name} en Twitter",lt
r:"ltr"},fa:{"%{followers_count} followers":"%{followers_count} ","%{n
:"> ","10M+":" +","10k unit":" ",Follow:"
aajaa","%{name} on Twitter":"%{name} Twitteriss",",":",",".":".","100K+":"100 000+
","10M+":"10+ milj.","10k unit":"10 000 yksikk",Follow:"Seuraa","Follow %{name} on T
witter":"Seuraa kyttj %{name} Twitteriss","Follow %{screen_name}":"Seuraa kyttj
"tuhatta",M:"milj.","This page has been shared %{tweets} times. View these Tweet
s.":"Tm sivu on jaettu %{tweets} kertaa. Nyt nm twiitit.",Tweet:"Twiittaa","Tweet
":"Twiittaa %{hashtag}","Tweet to %{name}":"Twiittaa kyttjlle %{name}","You are follow
ing %{name} on Twitter":"Seuraat kyttj %{name} Twitteriss",ltr:"ltr"},fil:{"%{follo
unt} followers":"%{followers_count} mga tagasunod","%{name} on Twitter":"%{name}
sa Twitter",",":",",".":".","100K+":"100K+","10M+":"10M+","10k unit":"10k yunit
",Follow:"Sundan","Follow %{name} on Twitter":"Sundan si %{name} sa Twitter","Fo
llow %{screen_name}":"Sundan si %{screen_name}",K:"K",M:"M","This page has been
shared %{tweets} times. View these Tweets.":"Ang pahinang ito ay ibinahagi nang
%{tweets} beses. Tingnan ang mga Tweet na ito.",Tweet:"I-tweet","Tweet %{hashtag
}":"I-tweet ang %{hashtag}","Tweet to %{name}":"Mag-Tweet kay %{name}","You are
following %{name} on Twitter":"Sinusundan mo si %{name} sa Twitter",ltr:"ltr"},f
r:{"%{followers_count} followers":"%{followers_count} abonns","%{name} on Twitter"
:"%{name} sur Twitter",",":" ",".":",","100K+":"100K+","10M+":"10M+","10k unit":
"unit de 10k",Follow:"Suivre","Follow %{name} on Twitter":"Suivre %{name} sur Twit
ter","Follow %{screen_name}":"Suivre %{screen_name}",K:"K",M:"M","This page has
been shared %{tweets} times. View these Tweets.":"Cette page a t partage %{tweets} foi
s. Voir ces Tweets.",Tweet:"Tweeter","Tweet %{hashtag}":"Tweeter %{hashtag}","Tw
eet to %{name}":"Tweeter %{name}","You are following %{name} on Twitter":"Vous su
ivez %{name} sur Twitter",ltr:"ltr"},he:{"%{followers_count} followers":"%{follo
wers_count} ","%{name} on Twitter":"%{name} ",",":",",".":".","100K
imes. View these Tweets.":" %{tweets} .
:"%{followers_count} ","%{name} on Twitter":"%{name}
,"100K+":"100E+","10M+":"10M+","10k unit":"10E+",Follow:"Kvets","Follow %{name} on T
witter":"Kvesd t a Twitteren: %{name}!","Follow %{screen_name}":"%{screen_name} kvets
K:"E",M:"M","This page has been shared %{tweets} times. View these Tweets.":"Ezt
az oldalt %{tweets} alkalommal osztottk meg. Nzd meg ezeket a tweeteket! ",Tweet:"T
weet","Tweet %{hashtag}":"%{hashtag} tweetelse","Tweet to %{name}":"Tweet kldse neki:
%{name}","You are following %{name} on Twitter":"Kveted t a Twitteren: %{name}",ltr:
"ltr"},id:{"%{followers_count} followers":"%{followers_count} pengikut","%{name}
on Twitter":"%{name} di Twitter",",":".",".":",","100K+":"100 ribu+","10M+":"10
juta+","10k unit":"10 ribu unit",Follow:"Ikuti","Follow %{name} on Twitter":"Ik
uti %{name} di Twitter","Follow %{screen_name}":"Ikuti %{screen_name}",K:"&nbsp;
ribu",M:"&nbsp;juta","This page has been shared %{tweets} times. View these Twee
ts.":"Halaman ini telah disebarkan %{tweets} kali. Lihat Tweet ini.",Tweet:"Twee
t","Tweet %{hashtag}":"Tweet %{hashtag}","Tweet to %{name}":"Tweet ke %{name}","
You are following %{name} on Twitter":"Anda mengikuti %{name} di Twitter",ltr:"l
tr"},it:{"%{followers_count} followers":"%{followers_count} follower","%{name} o
n Twitter":"%{name} su Twitter",",":".",".":",","100K+":"100K+","10M+":"10M+","1
0k unit":"10k unit",Follow:"Segui","Follow %{name} on Twitter":"Segui %{name} su T
witter","Follow %{screen_name}":"Segui %{screen_name}",K:"K",M:"M","This page ha
s been shared %{tweets} times. View these Tweets.":"Questa pagina stata condivisa
%{tweets} volte. Visualizza questi Tweet.",Tweet:"Tweet","Tweet %{hashtag}":"Tw
itta %{hashtag}","Tweet to %{name}":"Twitta a %{name}","You are following %{name
} on Twitter":"Stai seguendo %{name} su Twitter",ltr:"ltr"},ja:{"%{followers_cou
nt} followers":"%{followers_count} ","%{name} on Twitter":"%{name}
er":"Twitter %{name} ","Follow %{screen_name}":"%{screen
s_count} ","%{name} on Twitter":"
%{name} ",",":",",".":".",
{screen_name} ",K:" ",M:" ","This page has been shared %{tweets} times.
me} on Twitter":" %{name} .",ltr:"Itr"},msa:{"%{fo
tter":"%{name} di Twitter",",":",",".":".","100K+":"100 ribu+","10M+":"10 juta+"
,"10k unit":"10 ribu unit",Follow:"Ikut","Follow %{name} on Twitter":"Ikuti %{na

me} di Twitter","Follow %{screen_name}":"Ikut %{screen_name}",K:"ribu",M:"juta",


"This page has been shared %{tweets} times. View these Tweets.":"Halaman ini tel
ah dikongsi sebanyak %{tweets} kali. Lihat Tweet-tweet ini.",Tweet:"Tweet","Twee
t %{hashtag}":"Tweet %{hashtag}","Tweet to %{name}":"Tweet kepada %{name}","You
are following %{name} on Twitter":"Anda mengikuti %{name} di Twitter",ltr:"ltr"}
,nl:{"%{followers_count} followers":"%{followers_count} volgers","%{name} on Twi
tter":"%{name} op Twitter",",":".",".":",","100K+":"100k+","10M+":"10 mln.+","10
k unit":"10k-eenheid",Follow:"Volgen","Follow %{name} on Twitter":"%{name} volge
n op Twitter","Follow %{screen_name}":"%{screen_name} volgen",K:"k",M:" mln.","T
his page has been shared %{tweets} times. View these Tweets.":"Deze pagina is %{
tweets} keer gedeeld. Deze tweets weergeven.",Tweet:"Tweeten","Tweet %{hashtag}"
:"%{hashtag} tweeten","Tweet to %{name}":"Tweeten naar %{name}","You are followi
ng %{name} on Twitter":"Je volgt %{name} op Twitter",ltr:"Itr"},no:{"%{followers
_count} followers":"%{followers_count} flgere","%{name} on Twitter":"%{name} p Twitt
er",",":",",".":".","100K+":"100K+","10M+":"10M+","10k unit":"10k ",Follow:"Flg","
Follow %{name} on Twitter":"Flg %{name} p Twitter","Follow %{screen_name}":"Flg %{scre
en_name}",K:"K",M:"M","This page has been shared %{tweets} times. View these Twe
ets.":"Denne siden har blitt delt %{tweets} ganger. Se tweetene her.",Tweet:"Twe
et","Tweet %{hashtag}":"Tweet %{hashtag}","Tweet to %{name}":"Send tweet til %{n
ame}","You are following %{name} on Twitter":"Du flger %{name} p Twitter",ltr:"ltr"}
,pl:{"%{followers_count} followers":"%{followers_count} obserwuj cych","%{name} on
Twitter":"%{name} na Twitterze",",":",",".":".","100K+":"100 tys.+","10M+":"10 m
ln+","10k unit":"10 tys.",Follow:"Obserwuj","Follow %{name} on Twitter":"Obserwu
j %{name} na Twitterze","Follow %{screen_name}":"Obserwuj %{screen_name}",K:"tys
.",M:"mln","This page has been shared %{tweets} times. View these Tweets.":"Ta s
trona zosta a udost pniona %{tweets} razy. Zobacz te tweety.",Tweet:"Tweetnij","Tweet
%{hashtag}":"Tweetnij %{hashtag}","Tweet to %{name}":"Tweetnij do %{name}","You
are following %{name} on Twitter":"Obserwujesz %{name} na Twitterze",ltr:"ltr"},
pt:{"%{followers_count} followers":"%{followers_count} seguidores","%{name} on T
witter":"%{name} no Twitter",",":".",".":".","100K+":"+100 mil","10M+":"+10 milhes
","10k unit":"10 mil unidades",Follow:"Seguir","Follow %{name} on Twitter":"Siga
%{name} no Twitter","Follow %{screen_name}":"Seguir %{screen_name}",K:"Mil",M:"
M","This page has been shared %{tweets} times. View these Tweets.":"Esta pgina foi
compartilhada %{tweets} vezes. Veja todos os Tweets.",Tweet:"Tweetar","Tweet %{
hashtag}":"Tweetar %{hashtag}","Tweet to %{name}":"Tweetar para %{name}","You ar
e following %{name} on Twitter":"Voc est seguindo %{name} no Twitter",ltr:"ltr"},ru:
{"%{followers_count} followers":" : %{followers_count} ","%{name} on Twitter":
100 .+","10M+":"10 .+","10k unit":" 10k",Follow:" ","Follow %{
shared %{tweets} times. View these Tweets.":"
lowers_count} fljare","%{name} on Twitter":"%{name} p Twitter",",":",",".":".","100K
+":"100K+","10M+":"10M+","10k unit":"10k",Follow:"Flj","Follow %{name} on Twitter"
:"Flj %{name} p Twitter","Follow %{screen_name}":"Flj %{screen_name}",K:"K",M:"M","Thi
s page has been shared %{tweets} times. View these Tweets.":"Den hr sidan har dela
ts %{tweets} gnger. Visa dessa tweets.",Tweet:"Tweeta","Tweet %{hashtag}":"Tweeta
%{hashtag}","Tweet to %{name}":"Tweeta till %{name}","You are following %{name}
on Twitter":"Du fljer %{name} p Twitter",ltr:"ltr"},th:{"%{followers_count} follower
s":"%{followers_count} ","%{name} on Twitter":"%{name}
.":".","100K+":"+100 bin","10M+":"+10 milyon","10k unit":"10 bin birim",Follow:"
Takip et","Follow %{name} on Twitter":"%{name} adl ki iyi Twitter'da takip et","Follo
w %{screen_name}":"Takip et: %{screen_name}",K:"bin",M:"milyon","This page has b
een shared %{tweets} times. View these Tweets.":"Bu sayfa %{tweets} defa payla ld. Twee
tleri grntle.",Tweet:"Tweetle","Tweet %{hashtag}":"Tweetle: %{hashtag}","Tweet to %{na
me}":"Tweetle: %{name}","You are following %{name} on Twitter":"Twitter'da %{nam
e} adl ki iyi takip ediyorsun",ltr:"ltr"},ur:{"%{followers_count} followers":"%{follo
wers_count} ","%{name} on Twitter":"%{name} ",",":" ",".":".","10
Tweets.":" %{tweets} .
me}
Twitter",",":",",".":".","100K+":"10 +","10M+":"1000 +","10k unit":"1 ",F
witter":" Twitter %{name}","Follow %{screen_name}":" %{screen_name}",K:"
%{tweets} times. View these Tweets.":" %{tweets}
witter":" Twitter %{name}",ltr:"ltr"},"zh-tw":{"%{followers_count} followe

","%{name} on Twitter":"Twitter %{name}",",":",",".":" ","100K+":"


ollow %{screen_name}":" %{screen_name}",K:" ",M:" ","This page has been shared %
iew these Tweets.":" %{tweets} , ",Tweet:" ",
ltr"}};</script><script type="text/javascript">(function(e,t){function y(e){for(
var t=1,n;n=arguments[t];t++)for(var r in n)e[r]=n[r];return e}function b(e){ret
urn Array.prototype.slice.call(e)}function E(e,t){for(var n=0,r;r=e[n];n++)if(t=
=r)return n;return-1}function S(){var e=b(arguments),t=[];for(var n=0,r=e.length
;n<r;n++)e[n].length>0&&t.push(e[n].replace(/\/$/,""));return t.join("/")}functi
on x(e,t,n){var r=t.split("/"),i=e;while(r.length>1){var s=r.shift();i=i[s]=i[s]
||{}}i[r[0]]=n}function T(){}function N(e,t){this.id=this.path=e,this.force=!!t}
function C(e,t){this.id=e,this.body=t,typeof t=="undefined"&&(this.path=this.res
olvePath(e))}function k(e,t){this.deps=e,this.collectResults=t,this.deps.length=
=0&&this.complete()}function L(e,t){this.deps=e,this.collectResults=t}function A
(){for(var e in r)if(r[e].readyState=="interactive")return c[r[e].id]}function O
(e,t){var r;return!e&&n&&(r=l||A()),r?(delete c[r.scriptId],r.body=t,r.execute()
):(f=r=new C(e,t),a[r.id]=r),r}function M(){var e=b(arguments),t,n;return typeof
e[0]=="string"&&(t=e.shift()),n=e.shift(),O(t,n)}function _(e,t){var n=t.id||""
,r=n.split("/");r.pop();var i=r.join("/");return e.replace(/^\./,i)}function D(e
,t){function r(e){return C.exports[_(e,t)]}var n=[];for(var i=0,s=e.length;i<s;i
++){if(e[i]=="require"){n.push(r);continue}if(e[i]=="exports"){t.exports=t.expor
ts||{},n.push(t.exports);continue}n.push(r(e[i]))}return n}function P(){var e=b(
arguments),t=[],n,r;return typeof e[0]=="string"&&(n=e.shift()),w(e[0])&&(t=e.sh
ift()),r=e.shift(),O(n,function(e){function s(){var i=D(b(t),n),s;typeof r=="fun
ction"?s=r.apply(n,i):s=r,typeof s=="undefined"&&(s=n.exports),e(s)}var n=this,i
=[];for(var o=0,u=t.length;o<u;o++){var a=t[o];E(["require","exports"],a)==-1&&i
.push(_(a,n))}i.length>0?H.apply(this,i.concat(s)):s()})}function H(){var e=b(ar
guments),t,n;typeof e[e.length-1]=="function"&&(t=e.pop()),typeof e[e.length-1]=
="boolean"&&(n=e.pop());var r=new k(B(e,n),n);return t&&r.then(t),r}function B(e
,t){var n=[];for(var r=0,i;i=e[r];r++)typeof i=="string"&&(i=j(i)),w(i)&&(i=new
L(B(i,t),t)),n.push(i);return n}function j(e){var t,n;for(var r=0,i;i=H.matchers
[r];r++){var s=i[0],o=i[1];if(t=e.match(s))return o(e)}throw new Error(e+" was n
ot recognised by loader")}function I(){return e.using=h,e.provide=p,e.define=d,e
.loadrunner=v,F}function q(e){for(var t=0;t<H.bundles.length;t++)for(var n in H.
bundles[t])if(n!=e&&E(H.bundles[t][n],e)>-1)return n}var n=e.attachEvent&&!e.ope
ra,r=t.getElementsByTagName("script"),i=0,s,o=t.createElement("script"),u={},a={
},f,l,c={},h=e.using,p=e.provide,d=e.define,v=e.loadrunner;for(var m=0,g;g=r[m];
m++)if(g.src.match(/loadrunner\.js(\?|#|$)/)){s=g;break}var w=Array.isArray||fun
ction(e){return e.constructor==Array};T.prototype.then=function(t){var n=this;re
turn this.started||(this.started=!0,this.start()),this.completed?t.apply(e,this.
results):(this.callbacks=this.callbacks||[],this.callbacks.push(t)),this},T.prot
otype.start=function(){},T.prototype.complete=function(){if(!this.completed){thi
s.results=b(arguments),this.completed=!0;if(this.callbacks)for(var t=0,n;n=this.
callbacks[t];t++)n.apply(e,this.results)}},N.loaded=[],N.prototype=new T,N.proto
type.start=function(){var e=this,t,n,r;return(r=a[this.id])?(r.then(function(){e
.complete()}),this):((t=u[this.id])?t.then(function(){e.loaded()}):!this.force&&
E(N.loaded,this.id)>-1?this.loaded():(n=q(this.id))?H(n,function(){e.loaded()}):
this.load(),this)},N.prototype.load=function(){var t=this;u[this.id]=t;var n=o.c
loneNode(!1);this.scriptId=n.id="LR"+ ++i,n.type="text/javascript",n.async=!0,n.
onerror=function(){throw new Error(t.path+" not loaded")},n.onreadystatechange=n
.onload=function(n){n=e.event||n;if(n.type=="load"||E(["loaded","complete"],this
.readyState)>-1)this.onreadystatechange=null,t.loaded()},n.src=this.path,l=this,
r[0].parentNode.insertBefore(n,r[0]),l=null,c[n.id]=this},N.prototype.loaded=fun
ction(){this.complete()},N.prototype.complete=function(){E(N.loaded,this.id)==-1
&&N.loaded.push(this.id),delete u[this.id],T.prototype.complete.apply(this,argum
ents)},C.exports={},C.prototype=new N,C.prototype.resolvePath=function(e){return
S(H.path,e+".js")},C.prototype.start=function(){var e,t,n=this,r;this.body?this
.execute():(e=C.exports[this.id])?this.exp(e):(t=a[this.id])?t.then(function(e){
n.exp(e)}):(bundle=q(this.id))?H(bundle,function(){n.start()}):(a[this.id]=this,
this.load())},C.prototype.loaded=function(){var e,t,r=this;n?(t=C.exports[this.i
d])?this.exp(t):(e=a[this.id])&&e.then(function(e){r.exp(e)}):(e=f,f=null,e.id=e

.id||this.id,e.then(function(e){r.exp(e)}))},C.prototype.complete=function(){del
ete a[this.id],N.prototype.complete.apply(this,arguments)},C.prototype.execute=f
unction(){var e=this;typeof this.body=="object"?this.exp(this.body):typeof this.
body=="function"&&this.body.apply(window,[function(t){e.exp(t)}])},C.prototype.e
xp=function(e){this.complete(this.exports=C.exports[this.id]=e||{})},k.prototype
=new T,k.prototype.start=function(){function t(){var t=[];e.collectResults&&(t[0
]={});for(var n=0,r;r=e.deps[n];n++){if(!r.completed)return;r.results.length>0&&
(e.collectResults?r instanceof L?y(t[0],r.results[0]):x(t[0],r.id,r.results[0]):
t=t.concat(r.results))}e.complete.apply(e,t)}var e=this;for(var n=0,r;r=this.dep
s[n];n++)r.then(t);return this},L.prototype=new T,L.prototype.start=function(){v
ar e=this,t=0,n=[];return e.collectResults&&(n[0]={}),function r(){var i=e.deps[
t++];i?i.then(function(t){i.results.length>0&&(e.collectResults?i instanceof L?y
(n[0],i.results[0]):x(n[0],i.id,i.results[0]):n.push(i.results[0])),r()}):e.comp
lete.apply(e,n)}(),this},P.amd={};var F=function(e){return e(H,M,F,define)};F.Sc
ript=N,F.Module=C,F.Collection=k,F.Sequence=L,F.Dependency=T,F.noConflict=I,e.lo
adrunner=F,e.using=H,e.provide=M,e.define=P,H.path="",H.matchers=[],H.matchers.a
dd=function(e,t){this.unshift([e,t])},H.matchers.add(/(^script!|\.js$)/,function
(e){var t=new N(e.replace(/^\$/,H.path.replace(/\/$/,"")+"/").replace(/^script!/
,""),!1);return t.id=e,t}),H.matchers.add(/^[a-zA-Z0-9_\-\/]+$/,function(e){retu
rn new C(e)}),H.bundles=[],s&&(H.path=s.getAttribute("data-path")||s.src.split(/
loadrunner\.js/)[0]||"",(main=s.getAttribute("data-main"))&&H.apply(e,main.split
(/\s*,\s*/)).then(function(){}))})(this,document);;var __twttrlr = loadrunner.no
Conflict();__twttrlr(function(using, provide, loadrunner, define) {provide("i18n
/languages",function(a){a(["hi","zh-cn","fr","zh-tw","msa","fil","fi","sv","pl",
"ja","ko","de","it","pt","es","ru","id","tr","da","no","nl","hu","fa","ar","ur",
"he","th"])});provide("util/querystring",function(a){function b(a){return encode
URIComponent(a).replace(/\+/g,"%2B")}function c(a){return decodeURIComponent(a)}
function d(a){var c=[],d;for(d in a)a[d]!==null&&typeof a[d]!="undefined"&&c.pus
h(b(d)+"="+b(a[d]));return c.sort().join("&")}function e(a){var b={},d,e,f,g;if(
a){d=a.split("&");for(g=0;f=d[g];g++)e=f.split("="),e.length==2&&(b[c(e[0])]=c(e
[1]))}return b}function f(a,b){var c=d(b);return c.length>0?a.indexOf("?")>=0?a+
"&"+d(b):a+"?"+d(b):a}function g(a){var b=a&&a.split("?");return b.length==2?e(b
[1]):{}}a({url:f,decodeURL:g,decode:e,encode:d,encodePart:b,decodePart:c})});pro
vide("util/params",function(a){using("util/querystring",function(b){var c=functi
on(a){var c=a.search.substr(1);return b.decode(c)},d=function(a){var c=a.href,d=
c.indexOf("#"),e=d<0?"":c.substring(d+1);return b.decode(e)},e=function(a){var b
={},e=c(a),f=d(a);for(var g in e)e.hasOwnProperty(g)&&(b[g]=e[g]);for(var g in f
)f.hasOwnProperty(g)&&(b[g]=f[g]);return b};a({combined:e,fromQuery:c,fromFragme
nt:d})})});provide("tfw/util/env",function(a){using("util/params",function(b){fu
nction d(){var a=36e5,d=b.combined(document.location)._;return c!==undefined?c:(
c=!1,d&&/^\d+$/.test(d)&&(c=+(new Date)-parseInt(d)<a),c)}var c;a({isDynamicWidg
et:d})})});provide("xd/detection",function(a){function b(){try{return!!navigator
.plugins["Shockwave Flash"]||!!(new ActiveXObject("ShockwaveFlash.ShockwaveFlash
"))}catch(a){return!1}}a({getFlashEnabled:b,hasPostMessage:!!window.postMessage,
isIE:!!navigator.userAgent.match("MSIE")})});provide("util/widgetrpc",function(a
){using("xd/detection","tfw/util/env",function(b,c){function k(){if(f)return f;i
f(!c.isDynamicWidget())return;var a=0,d=parent.frames.length,g;try{f=parent.fram
es[e];if(f)return f}catch(h){}if(!b.isIE)return;for(;a<d;a++)try{g=parent.frames
[a];if(g&&typeof g.openIntent=="function")return f=g}catch(h){}}function l(){var
a={};(typeof arguments[0]).toLowerCase()==="function"?a.success=arguments[0]:a=
arguments[0];var b=a.success||function(){},d=a.timeout||function(){},e=a.nohub||
function(){},f=a.complete||function(){},m=a.attempt!==undefined?a.attempt:j;if(!
c.isDynamicWidget()||g)return e(),f(),!1;var n=k();m--;try{if(n&&n.trigger){b(n)
,f();return}}catch(o){}if(m<=0){g=!0,d(),f();return}if(+(new Date)-h>i*j){g=!0,e
();return}window.setTimeout(function(){l({success:b,timeout:d,nohub:e,attempt:m,
complete:f})},i)}var d="twttrHubFrameSecure",e=document.location.protocol=="http
:"?"twttrHubFrame":d,f,g,h=+(new Date),i=100,j=20;a({withHub:l,contextualHubId:e
,secureHubId:d})})});provide("util/decider",function(a){function c(a){var c=b[a]
||!1;if(!c)return!1;if(c===!0||c===100)return!0;var d=Math.random()*100,e=c>=d;r
eturn b[a]=e,e}var b={force_new_cookie:100,rufous_pixel:100,decider_fixture:12.3

4};a({isAvailable:c})});provide("util/util",function(a){function b(a){var b=1,c,


d;for(;c=arguments[b];b++)for(d in c)if(!c.hasOwnProperty||c.hasOwnProperty(d))a
[d]=c[d];return a}function c(a){for(var b in a)a.hasOwnProperty(b)&&!a[b]&&a[b]!
==!1&&a[b]!==0&&delete a[b]}function d(a,b){var c=0,d;for(;d=a[c];c++)if(b==d)re
turn c;return-1}function e(a,b){if(!a)return null;if(a.filter)return a.filter.ap
ply(a,[b]);if(!b)return a;var c=[],d=0,e;for(;e=a[d];d++)b(e)&&c.push(e);return
c}function f(a,b){if(!a)return null;if(a.map)return a.map.apply(a,[b]);if(!b)ret
urn a;var c=[],d=0,e;for(;e=a[d];d++)c.push(b(e));return c}function g(a){return
a&&a.replace(/(^\s+|\s+$)/g,"")}function h(a){return{}.toString.call(a).match(/\
s([a-zA-Z]+)/)[1].toLowerCase()}function i(a){return a&&String(a).toLowerCase().
indexOf("[native code]")>-1}function j(a,b){if(a.contains)return a.contains(b);v
ar c=b.parentNode;while(c){if(c===a)return!0;c=c.parentNode}return!1}function k(
a){return a===Object(a)}a({aug:b,compact:c,containsElement:j,filter:e,map:f,trim
:g,indexOf:d,isNative:i,isObject:k,toType:h})});provide("dom/cookie",function(a)
{using("util/util",function(b){a(function(a,c,d){var e=b.aug({},d);if(arguments.
length>1&&String(c)!=="[object Object]"){if(c===null||c===undefined)e.expires=-1
;if(typeof e.expires=="number"){var f=e.expires,g=new Date((new Date).getTime()+
f*60*1e3);e.expires=g}return c=String(c),document.cookie=[encodeURIComponent(a),
"=",e.raw?c:encodeURIComponent(c),e.expires?"; expires="+e.expires.toUTCString()
:"",e.path?"; path="+e.path:"",e.domain?"; domain="+e.domain:"",e.secure?"; secu
re":""].join("")}e=c||{};var h,i=e.raw?function(a){return a}:decodeURIComponent;
return(h=(new RegExp("(?:^|; )"+encodeURIComponent(a)+"=([^;]*)")).exec(document
.cookie))?i(h[1]):null})})});provide("util/donottrack",function(a){using("dom/co
okie",function(b){a(function(a){var c=/\.(gov|mil)(:\d+)?$/i,d=/https?:\/\/([^\/
]+).*/i;return a=a||document.referrer,a=d.test(a)&&d.exec(a)[1],b("dnt")?!0:c.te
st(document.location.host)?!0:a&&c.test(a)?!0:document.navigator?document.naviga
tor["doNotTrack"]==1:navigator?navigator["doNotTrack"]==1||navigator["msDoNotTra
ck"]==1:!1})})});provide("tfw/util/guest_cookie",function(a){using("dom/cookie",
"util/donottrack","util/decider",function(b,c,d){function f(){var a=b(e)||!1;if(
!a)return;a.match(/^v3\:/)||g()}function g(){b(e)&&b(e,null,{domain:".twitter.co
m",path:"/"})}function h(){c()&&g()}var e="pid";a({set:h,destroy:g,forceNewCooki
e:f,guest_id_cookie:e})})});provide("$xd/json2.js", function(exports) {window.JS
ON||(window.JSON={}),function(){function f(a){return a<10?"0"+a:a}function quote
(a){return escapable.lastIndex=0,escapable.test(a)?'"'+a.replace(escapable,funct
ion(a){var b=meta[a];return typeof b=="string"?b:"\\u"+("0000"+a.charCodeAt(0).t
oString(16)).slice(-4)})+'"':'"'+a+'"'}function str(a,b){var c,d,e,f,g=gap,h,i=b
[a];i&&typeof i=="object"&&typeof i.toJSON=="function"&&(i=i.toJSON(a)),typeof r
ep=="function"&&(i=rep.call(b,a,i));switch(typeof i){case"string":return quote(i
);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":retu
rn String(i);case"object":if(!i)return"null";gap+=indent,h=[];if(Object.prototyp
e.toString.apply(i)==="[object Array]"){f=i.length;for(c=0;c<f;c+=1)h[c]=str(c,i
)||"null";return e=h.length===0?"[]":gap?"[\n"+gap+h.join(",\n"+gap)+"\n"+g+"]":
"["+h.join(",")+"]",gap=g,e}if(rep&&typeof rep=="object"){f=rep.length;for(c=0;c
<f;c+=1)d=rep[c],typeof d=="string"&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":
")+e))}else for(d in i)Object.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&h.push(qu
ote(d)+(gap?": ":":")+e));return e=h.length===0?"{}":gap?"{\n"+gap+h.join(",\n"+
gap)+"\n"+g+"}":"{"+h.join(",")+"}",gap=g,e}}typeof Date.prototype.toJSON!="func
tion"&&(Date.prototype.toJSON=function(a){return isFinite(this.valueOf())?this.g
etUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.
getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null}
,String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=functi
on(a){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17
b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"
\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202
f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n"
:"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!="
function"&&(JSON.stringify=function(a,b,c){var d;gap="",indent="";if(typeof c=="
number")for(d=0;d<c;d+=1)indent+=" ";else typeof c=="string"&&(indent=c);rep=b;i
f(!b||typeof b=="function"||typeof b=="object"&&typeof b.length=="number")return
str("",{"":a});throw new Error("JSON.stringify")}),typeof JSON.parse!="function

"&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&ty


peof e=="object")for(c in e)Object.hasOwnProperty.call(e,c)&&(d=walk(e,c),d!==un
defined?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;cx.lastIndex=0,cx.t
est(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0)
.toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfn
rt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*
)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("(
"+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("
JSON.parse")})}();exports();loadrunner.Script.loaded.push("$xd/json2.js")});prov
ide("util/env",function(a){var b=window.navigator.userAgent;a({retina:function()
{return(window.devicePixelRatio||1)>1},anyIE:function(){return/MSIE \d/.test(b)}
,ie6:function(){return/MSIE 6/.test(b)},ie7:function(){return/MSIE 7/.test(b)},c
spEnabledIE:function(){return/MSIE 1\d/.test(b)},touch:function(){return"ontouch
start"in window||/Opera Mini/.test(b)||navigator.msMaxTouchPoints>0},cssTransiti
ons:function(){var a=document.body.style;return a.transition!==undefined||a.webk
itTransition!==undefined||a.mozTransition!==undefined||a.oTransition!==undefined
||a.msTransition!==undefined}})});provide("util/domready",function(a){function k
(){b=1;for(var a=0,d=c.length;a<d;a++)c[a]()}var b=0,c=[],d,e,f=!1,g=document.cr
eateElement("a"),h="DOMContentLoaded",i="addEventListener",j="onreadystatechange
";/^loade|c/.test(document.readyState)&&(b=1),document[i]&&document[i](h,e=funct
ion(){document.removeEventListener(h,e,f),k()},f),g.doScroll&&document.attachEve
nt(j,d=function(){/^c/.test(document.readyState)&&(document.detachEvent(j,d),k()
)});var l=g.doScroll?function(a){self!=top?b?a():c.push(a):!function(){try{g.doS
croll("left")}catch(b){return setTimeout(function(){l(a)},50)}a()}()}:function(a
){b?a():c.push(a)};a(l)});provide("dom/sandbox",function(a){using("util/domready
","util/env",function(b,c){function e(a,b){var c,d,e;if(a.name){try{e=document.c
reateElement('<iframe name="'+a.name+'"></iframe>')}catch(f){e=document.createEl
ement("iframe"),e.name=a.name}delete a.name}else e=document.createElement("ifram
e");a.id&&(e.id=a.id,delete a.id);for(c in a)a.hasOwnProperty(c)&&e.setAttribute
(c,a[c]);e.allowtransparency="true",e.scrolling="no",e.setAttribute("frameBorder
",0),e.setAttribute("allowTransparency",!0);for(d in b||{})b.hasOwnProperty(d)&&
(e.style[d]=b[d]);return e}function f(a,b,c,d){var f;this.attrs=b||{},this.style
s=c||{},this.appender=d,this.onReady=a,this.sandbox={},f=e(this.attrs,this.style
s),f.onreadystatechange=f.onload=this.getCallback(this.onLoad),this.sandbox.fram
e=f,d?d(f):document.body.appendChild(f)}function g(a,c,d,e){b(function(){new f(a
,c,d,e)})}var d=0;window.twttr||(window.twttr={}),window.twttr.sandbox||(window.
twttr.sandbox={}),f.prototype.getCallback=function(a){var b=this,c=!1;return fun
ction(){c||(c=!0,a.call(b))}},f.prototype.registerCallback=function(a){var b="cb
"+d++;return window.twttr.sandbox[b]=a,b},f.prototype.onLoad=function(){try{this
.sandbox.frame.contentWindow.document}catch(a){this.setDocDomain();return}this.s
andbox.win=this.sandbox.frame.contentWindow,this.sandbox.doc=this.sandbox.frame.
contentWindow.document,this.writeStandardsDoc(),this.sandbox.body=this.sandbox.f
rame.contentWindow.document.body,this.onReady(this.sandbox)},f.prototype.setDocD
omain=function(){var a,b=this.registerCallback(this.getCallback(this.onLoad));a=
["javascript:",'document.write("");',"try { window.parent.document; }","catch (e
) {",'document.domain="'+document.domain+'";',"}",'window.parent.twttr.sandbox["
'+b+'"]();'].join(""),this.sandbox.frame.parentNode.removeChild(this.sandbox.fra
me),this.sandbox.frame=null,this.sandbox.frame=e(this.attrs,this.styles),this.sa
ndbox.frame.src=a,this.appender?this.appender(this.sandbox.frame):document.body.
appendChild(this.sandbox.frame)},f.prototype.writeStandardsDoc=function(){if(!c.
anyIE()||c.cspEnabledIE())return;var a=["<!DOCTYPE html>","<html>","<head>","<sc
r","ipt>","try { window.parent.document; }",'catch (e) {document.domain="'+docum
ent.domain+'";}',"</scr","ipt>","</head>","<body></body>","</html>"].join("");th
is.sandbox.doc.write(a),this.sandbox.doc.close()},a(g)})});provide("tfw/util/tra
cking",function(a){using("dom/cookie","dom/sandbox","util/donottrack","tfw/util/
guest_cookie","tfw/util/env","util/util","$xd/json2.js",function(b,c,d,e,f,g,h){
function u(){function a(a){s=a.frame,r=a.doc,q=a.doc.body,m=F(),n=G();while(o[0]
)z.apply(this,o.shift());p&&A()}s=document.getElementById("rufous-sandbox"),s?(r
=s.contentWindow.document,q=r.body):c(a,{id:"rufous-sandbox"},{display:"none"})}
function v(a,b,c,d){var e=!g.isObject(a),f=b?!g.isObject(b):!1,h,i;if(e||f)retur

n;if(/Firefox/.test(navigator.userAgent))return;h=C(a),i=D(b,!!c,!!d),y(h,i,!0)}
function w(a,c,h,i){var k=j[c],l,m,n=e.guest_id_cookie;if(!k)return;a=a||{},i=!!
i,h=!!h,m=a.original_redirect_referrer||document.referrer,i=i||d(m),l=g.aug({},a
),h||(x(l,"referrer",m),x(l,"widget",+f.isDynamicWidget()),x(l,"hask",+!!b("k"))
,x(l,"li",+!!b("twid")),x(l,n,b(n)||"")),i&&(x(l,"dnt",1),I(l)),H(k+"?"+E(l))}fu
nction x(a,b,c){var d=i+b;if(!a)return;return a[d]=c,a}function y(a,b,c){var d,e
,f,h,i,j="https://r.twimg.com/jot?";if(!g.isObject(a)||!g.isObject(b))return;if(
Math.random()>t)return;f=g.aug({},b,{event_namespace:a}),c?(j+=E({l:J(f)}),H(j))
:(d=m.firstChild,d.value=+d.value||+f.dnt,h=J(f),e=r.createElement("input"),e.ty
pe="hidden",e.name="l",e.value=h,m.appendChild(e))}function z(a,b,c,d){var e=!g.
isObject(a),f=b?!g.isObject(b):!1,h,i;if(e||f)return;if(!q||!m){o.push([a,b,c,d]
);return}h=C(a),i=D(b,!!c,!!d),y(h,i)}function A(){if(!m){p=!0;return}if(m.child
ren.length<=1)return;q.appendChild(m),q.appendChild(n),m.submit(),window.setTime
out(B(m,n),6e4),m=F(),n=G()}function B(a,b){return function(){var c=a.parentNode
;c.removeChild(a),c.removeChild(b)}}function C(a){var b={client:"tfw"},c,d;retur
n c=g.aug(b,a||{}),c}function D(a,b,c){var e={_category_:"tfw_client_event"},f,h
,i;return b=!!b,c=!!c,f=g.aug(e,a||{}),h=f.widget_origin||document.referrer,f.fo
rmat_version=1,f.dnt=c=c||d(h),f.triggered_on=f.triggered_on||+(new Date),b||(f.
widget_origin=h),c&&I(f),f}function E(a){var b=[],c,d,e;for(c in a)a.hasOwnPrope
rty(c)&&(d=encodeURIComponent(c),e=encodeURIComponent(a[c]),e=e.replace(/'/g,"%2
7"),b.push(d+"="+e));return b.join("&")}function F(){var a=r.createElement("form
"),b=r.createElement("input");return l++,a.action="https://r.twimg.com/jot",a.me
thod="POST",a.target="rufous-frame-"+l,a.id="rufous-form-"+l,b.type="hidden",b.n
ame="dnt",b.value=0,a.appendChild(b),a}function G(){var a,b="rufous-frame-"+l,c=
0;try{a=r.createElement("<iframe name="+b+">")}catch(d){a=r.createElement("ifram
e"),a.name=b}return a.id=b,a.style.display="none",a.width=0,a.height=0,a.border=
0,a}function H(a){var b=document.createElement("img");b.src=a,b.alt="",b.style.p
osition="absolute",b.style.height="1px",b.style.width="1px",b.style.top="-9999px
",b.style.left="-9999px",document.body.appendChild(b)}function I(a){var b;for(b
in a)~g.indexOf(k,b)&&delete a[b]}function J(a){var b=Array.prototype.toJSON,c;r
eturn delete Array.prototype.toJSON,c=JSON.stringify(a),b&&(Array.prototype.toJS
ON=b),c}var i="twttr_",j={tweetbutton:"//p.twitter.com/t.gif",followbutton:"//p.
twitter.com/f.gif",tweetembed:"//p.twitter.com/e.gif"},k=["hask","li","logged_in
","pid","user_id",e.guest_id_cookie,i+"hask",i+"li",i+e.guest_id_cookie],l=0,m,n
,o=[],p,q,r,s,t=1;e.forceNewCookie(),a({enqueue:z,flush:A,initPostLogging:u,addP
ixel:v,addLegacyPixel:w,addVar:x})})});using("util/domready","util/util","util/q
uerystring","util/params","tfw/util/tracking","tfw/util/guest_cookie","util/widg
etrpc","i18n/languages",function(a,b,c,d,e,f,g,h){function B(a){j=a,l.innerHTML=
H(j)}function C(){a(function(){if(o.url&&o.count!=="none"){var a=k.createElement
("script");a.type="text/javascript",a.src=twttr.config.countURL+"?url="+c.encode
Part(u)+"&callback=twttr.receiveCount",k.body.appendChild(a)}})}function D(){swi
tch(o.type){case"hashtag":return _("Tweet %{hashtag}",{hashtag:"<b>#"+o.button_h
ashtag+"</b>"});case"mention":return _("Tweet to %{name}",{name:"<b>@"+o.screen_
name+"</b>"});default:return _("Tweet")}}function E(){var a=k.getElementById("l"
);k.title=_("Tweet Button"),a.innerHTML=D()}function F(a,b){var c=a.id+"-desc",d
=document.createElement("p");d.id=c,d.className="aria",d.innerHTML=b,k.body.appe
ndChild(d),a.setAttribute("aria-describedby",c)}function G(a){var b="scrollbars=
yes,resizable=yes,toolbar=no,location=yes",c=550,d=420,e=screen.height,f=screen.
width,g=Math.round(f/2-c/2),h=0;return e>d&&(h=Math.round(e/2-d/2)),window.open(
a,null,b+",width="+c+",height="+d+",left="+g+",top="+h)}function H(a){var b,c,d=
parseInt(a,10),e=new RegExp("^\\"+_(",")),f={ja:1,ko:1};return isNaN(d)?"":d<1e4
?d.toString().split("").reverse().join("").replace(/(\d{3})/g,"$1"+_(",")).split
("").reverse().join("").replace(e,""):d<1e5?f[o.lang]?(c=(Math.floor(d/100)/100)
.toString(),c+_("10k unit")):(b=(Math.round(d/100)/10).toString(),b.replace(/\./
,_("."))+_("K")):_("100K+")}function I(a){return a=a||window.event,a&&a.preventD
efault?a.preventDefault():a.returnValue=!1,a&&a.stopPropagation?a.stopPropagatio
n():a.cancelBubble=!0,!1}function J(a){return a.replace(/(<)|(>)/g,function(a){v
ar b;return a[0]==="<"?b="&lt;":b="&gt;",b})}function K(a){for(var b=0,c=a.lengt
h;b<c;b++)a[b]=J(a[b]);return a}function L(a,b){a.className+=" "+b}f.set(),twttr
.config=b.aug({countURL:"//cdn.api.twitter.com/1/urls/count.json",intentURL:"htt

ps://twitter.com/intent/tweet"},twttr.config||{});var i="1.1",j=0,k=document,l=k
.getElementById("count"),m=k.getElementById("b"),n,o=K(d.combined(k.location)),p
={vertical:"vcount",horizontal:"hcount",none:"ncount"},q={l:"xl",m:"regular"},r=
["share","mention","hashtag"],s=[],t,u,v,w,x,y,z,A;o.lang=o.lang&&o.lang.toLower
Case(),k.body.parentNode.lang=twttr.lang=o.lang=~b.indexOf(h,o.lang)?o.lang:"en"
,A=_("ltr"),twttr.receiveCount=function(a){typeof a.count=="number"&&(B(a.count)
,L(k.body,"count-ready"),a.count>0&&(l.title=_("This page has been shared %{twee
ts} times. View these Tweets.",{tweets:a.count}),F(l,l.title)))},o.type=~b.index
Of(r,o.type)?o.type:"share",o.size=q[o.size]?o.size:"m",L(k.documentElement,q[o.
size]||""),o.align=="right"&&L(k.body,"right");if(o.type=="mention"||o.screen_na
me)(z=(o.screen_name||"").match(/^\s*@?([\w_]{1,20})\s*$/i))?o.screen_name=z[1]:
(delete o.screen_name,o.type=="mention"&&(o.type="share",o.count="none"));o.type
=="hashtag"||o.button_hashtag?((y=(o.button_hashtag||"").match(/^\s*#?([^.,<>!\s
\/#\-\(\)\'\"]+)\s*$/i))?(o.button_hashtag=y[1],o.hashtags=o.button_hashtag+","+
(o.hashtags||"")):(delete o.button_hashtag,o.type="share"),o.count="none"):o.typ
e=="share"?(o.url=o.url||k.referrer,u=o.counturl||o.url,v=u&&"http://twitter.com
/search?q="+c.encodePart(u),o.size=="l"&&o.count=="vertical"&&(o.count="none"),s
.push(p[o.count]||"hcount"),C()):o.count="none",s.push(A),L(k.body,s.join(" ")),
E(),L(k.body,"ready"),t={text:o.text,screen_name:o.screen_name,hashtags:o.hashta
gs,url:o.url,via:o.via,related:o.related,placeid:o.placeid,original_referer:k.re
ferrer,tw_p:"tweetbutton"},w=twttr.config.intentURL+"?"+c.encode(t),x=o.dnt&&o.d
nt.toLowerCase()==="true",e.addLegacyPixel(o,"tweetbutton",!1,x),e.addPixel({pag
e:"button",section:o.type,action:"impression"},{language:o.lang,client_version:i
+":"+o.size+(o.count!=="none"?":c":""),widget_origin:k.referrer},!1,x),l.href=v,
m.href=w,m.onclick=function(a){return g.withHub({nohub:function(){G(w,o.id)},tim
eout:function(){G(w,o.id)},success:function(a){a.openIntent(w,o.id),a.trigger("c
lick",{region:"tweet"},o.id)}}),I(a)},o.searchlink!="disabled"?(L(l.parentNode,"
enabled"),l.onclick=function(a){a=a||window.event,g.withHub(function(a){a.trigge
r("click",{region:"tweetcount"},o.id)});if(a.altKey||a.shiftKey||a.metaKey)retur
n;return window.open(v),I(a)}):l.onclick=function(a){I(a)}})});;</script><img sr
c="t.gif" alt="" style="position: absolute; height: 1px; width: 1px; top: -9999p
x; left: -9999px;"><img src="jot" alt="" style="position: absolute; height: 1px;
width: 1px; top: -9999px; left: -9999px;"><script type="text/javascript" src="c
ount.json"></script></body></html>/*!
* jQuery JavaScript Library v1.4.2
* http://jquery.com/
*
* Copyright 2010, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
* Copyright 2010, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
*
* Date: Sat Feb 13 22:33:48 2010 -0500
*/
(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left
")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({ur
l:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.in
nerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){v
ar i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}
if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[
o],b)):d,j);return a}return i?
e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}fu
nction Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.appl
y(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"eve
nts");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveF
ired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replac

e(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.cu
rrentTarget);n=0;for(r=
j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o
=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.re
latedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n
=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data
;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=f
alse;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.rep
lace(/\./g,"`").replace(/ /g,
"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function
ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var
f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={}
;for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}f
unction sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1
&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.che
ckClone||!ua.test(a[0]))){e=
true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.c
lean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}functi
on K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a
});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.d
efaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},
Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^
.[^:#\[\.,]*$/,Va=/\S/,
Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.us
erAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnPr
operty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexO
f;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){
this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context
=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="
string")if((d=Ta.exec(a))&&
(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(
b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a
[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment
).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==
d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;ret
urn this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElem
entsByTagName(a);return c.merge(this,
a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))r
eturn T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.cont
ext}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:functio
n(){return this.length},toArray:function(){return R.call(this,0)},get:function(a
){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function
(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.co
ntext=this.context;if(b===
"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=th
is.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)
},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);ret
urn this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:f
unction(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(
){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join("
,"))},map:function(a){return this.pushStack(c.map(this,
function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(
null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=
c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j
,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&
&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=nu
ll)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o)
)){i=i&&(c.isPlainObject(i)||
c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}ret
urn a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isRead

y:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13)
;c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHan
dler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.r
eadyState==="complete")return c.ready();if(s.addEventListener){s.addEventListene
r("DOMContentLoaded",
L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attac
hEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a
=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunctio
n:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return
$.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[ob
ject Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call
(a,"constructor")&&!aa.call(a.constructor.prototype,
"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEm
ptyObject:function(a){for(var b in a)return false;return true},error:function(a)
{throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim
(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@")
.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]")
.replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a)
:(new Function("return "+
a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a)
{if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=
s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.app
endChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.rem
oveChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()
===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunct
ion(a);if(d)if(i)for(f in a){if(b.apply(a[f],
d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)fo
r(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d
)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},mak
eArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.i
sFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);ret
urn b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.le
ngth;d<f;d++)if(b[d]===
a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==
="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f+
+];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++
)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,
i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply
([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="stri
ng"){d=a;a=d[b];b=w}else if(b&&
!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments
)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a
.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\
w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.
*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browse
r:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=
P.version}if(c.browser.webkit)c.browser.safari=
true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventList
ener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};e
lse if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("o
nreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentEleme
nt,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.d
isplay="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:re
d;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.l
ength||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getE
lementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").
length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("
href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat
,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createEle

ment("select").appendChild(s.createElement("option")).selected,
parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===nul
l,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxMode
l:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+
"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=t
rue;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.remov
eChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.
support.noCloneEvent=
false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.cr
eateElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='ch
ecked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.che
ckClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s
.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild
(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.
display="none"});a=function(k){var n=
s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");
r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.suppo
rt.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class
":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing
",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameb
order:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,
noData:{embed:true,object:true,
applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCa
se()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)retur
n null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else
if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:
a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()]
)){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObje
ct(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];
else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.exten
d({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[
0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var
d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getDa
ta"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1
]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(f
unction(){c.data(this,
a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)}
)}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b)
;if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push
(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if
(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,f
unction(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="s
tring"){b=a;a="fx"}if(b===
w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);
a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return t
his.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[
a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(
){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});
var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/
(button|input|object|select|textarea)/i,
cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(th
is,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(t
his,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(
c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(thi
s,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=
0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var
j=" "+e.className+" ",
i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.
className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c
.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(t

his,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").spl


it(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)i
f(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.
replace(" "+b[i]+" ",
" ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function
(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(
function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});re
turn this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(
ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==
="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.cl
assName);this.className=
this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:funct
ion(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+"
").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a
===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{
}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[
],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1
:e.length;j<d;j++){var i=
e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.
type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;ret
urn(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(
function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val()
);if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=
c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);
c("option",this).each(function(){this.selected=
c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.val
ue=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,wid
th:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a
.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!
c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b)
;if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error(
"type property can't be changed");
a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(
b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.speci
fied?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if
(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssT
ext}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b
,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)
$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,
function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||
a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handl
er){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.
events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&
&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split
(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.inde
xOf(".")>-1){r=k.split(".");
k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.t
ype=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.s
etup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o
,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if
(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}
},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e
,j=0,i,o,k,n,r,u,z=c.data(a),
C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="str
ing"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.s
plit(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift
();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\
.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B
];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remo
ve&&n.remove.call(a,u)}if(f!=

null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.c
all(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){
u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1
)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.ha
ndle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.
type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if
(e.indexOf("!")>=0){a.type=
e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c
.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.h
andle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target
=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.app
ly(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeN
ame.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}ca
tch(j){}if(!a.isPropagationStopped()&&
f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,
o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._de
fault.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()
])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}ca
tch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f
,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(
".")<0&&!a.exclusive;
if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).so
rt().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&
d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namesp
ace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arg
uments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation(
)}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey a
ttrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey cu
rrentTarget data detail eventPhase fromElement handler keyCode layerX layerY met
aKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode r
elatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelt
a which".split(" "),
fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.lengt
h,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.t
arget.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromEleme
nt)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX
==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.sc
rollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.cl
ientY+(b&&b.scrollTop||
d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode|
|a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKe
y&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:
a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{set
up:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origTyp
e,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.repla
ce(O,"");c.each(c.data(this,
"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false}
);b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if
(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(
this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListene
r?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEven
t("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);i
f(a&&a.type){this.originalEvent=
a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.pro
totype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalE
vent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropag
ation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.st
opPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagatio
n:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefa
ultPrevented:Y,isPropagationStopped:Y,

isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{fo


r(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(t
his,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(th
is,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,
b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,
a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.su
pport.submitBubbles)c.event.special.submit=
{setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"cli
ck.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="ima
ge")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.a
dd(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="te
xt"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("sub
mit",this,arguments)})}else return false},teardown:function(){c.event.remove(thi
s,".specialSubmit")}};
if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){v
ar b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="se
lect-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selecte
d}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;r
eturn d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOn
ly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio"
)c.data(d,"_change_data",
e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,
d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.tar
get,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select"
)return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCod
e===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||
d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:funct
ion(a){a=a.target;c.data(a,
"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(
var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeN
ame)},teardown:function(){c.event.remove(this,".specialChange");return da.test(t
his.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({fo
cus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.ty
pe=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){thi
s.addEventListener(a,
d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bin
d","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var
j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="on
e"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;
if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j+
+)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if
(typeof a==="object"&&
!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.len
gth;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){
return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===
0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.ea
ch(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[
0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this
[0]);return a.result}},
toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return
this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c
.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,ar
guments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||
a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:
"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,
o=0,k,n,r=j||this.selector,
u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i
=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")
d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.pus
h(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(thi

s,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.
unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resiz
e scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mo
useenter mouseleave change select submit keydown keypress keyup error".split(" "
),
function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.
attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onu
nload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c
.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0
;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nod
eType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.le
ngth;q<v;q++){var t=m[q];
if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nod
eType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;brea
k}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=
m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(
t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h)
{y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var
f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|
\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;ret
urn 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeTy
pe!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,
M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3]
;break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1
],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.
relative[g])g+=p.shift();
t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.
match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v
.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&
&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.ex
pr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();
v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}el
se y=[]}y||(y=t);y||k.error(D||
g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;
g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(
g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);
else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){
if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,
1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,
h,l){var m,q;if(!g)return[];
for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(
g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").rep
lace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}
}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h
,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.f
ilter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=
false;t.splice(1,1);if(D.substr(D.length1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(
t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,
t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.pus
h(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}
}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){th
row"Syntax error, unrecognized expression: "+g;};var n=k.selectors={order:["ID",
"NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]
|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.
*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|firs
t)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?
:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\(

[^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"ht
mlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},
relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m
;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.pr
eviousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||fals
e:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&
&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(
p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.l
ength;m<q;m++)if(p=g[m])g[m]=
l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m
=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("p
arentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&
&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},fin
d:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.ge
tElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="
undefined"){var l=[];
h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("na
me")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return
h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1]
.replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^
(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.p
ush(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\
/g,"")},TAG:function(g){return g[1].toLowerCase()},
CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]===
"even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1
]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].r
eplace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g
[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"
").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,
true^q);l||m.push.apply(m,
g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return
true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:funct
ion(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return
g.disabled===true},checked:function(g){return g.checked===true},selected:functi
on(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:f
unction(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},he
ader:function(g){return/h\d/i.test(g.nodeName)},
text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type
},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"=
==g.type},password:function(g){return"password"===g.type},submit:function(g){ret
urn"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g
){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName
.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button
/i.test(g.nodeName)}},
setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===
m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1}
,lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:fun
ction(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{P
SEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if
(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;
else if(q==="not"){h=
h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.erro
r("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m
=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===
1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)
if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1
&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeInde
x)){var v=0;for(m=p.firstChild;m;m=
m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;ret
urn l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getA

ttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName
.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute(
"class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.
attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];retu
rn g==null?m==="!=":m===
"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==
false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.leng
th)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l
,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u i
n n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.so
urce);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.repl
ace(/\\(\d+)/g,function(g,
h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);i
f(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.docum
entElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[objec
t Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for
(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);retu
rn h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.c
ompareDocumentPosition||
!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1
}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if
("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceI
ndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(
g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument
||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocu
ment.createRange(),m=
h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.se
tEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return
g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.i
nnerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChi
ld);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById
!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAtt
ributeNode!=="undefined"&&
q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){va
r p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.n
odeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g
=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTag
Name("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[
1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l
};g.innerHTML="<a href='#'></a>";
if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.ge
tAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("hr
ef",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div
");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAl
l(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))
try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in
g)k[l]=g[l];h=null}}();
(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div>
<div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassNa
me("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").
length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l
.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])}
;g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDo
cumentPosition(h)&16)}:
function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){retur
n(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=func
tion(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q
[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.lengt
h;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr["
:"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();

var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/,
gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return
c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.g
rep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a
,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else
b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn
.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.l
ength;f<e;f++){d=b.length;
c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i
]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return thi
s.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))retu
rn true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filt
er:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a)
{return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){va
r d=[],f=this[0],e,j=
{},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.m
atch.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i
in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});d
elete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.
context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(
k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function
(a){if(!a||typeof a===
"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inAr
ray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.c
ontext):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||q
a(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c
.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parent
s:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return
c.dir(a,"parentNode",
d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.
nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},p
revAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){
return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previ
ousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)
},children:function(a){return c.sibling(a.firstChild)},contents:function(a){retu
rn c.nodeName(a,"iframe")?
a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function
(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof
f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||g
b.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments)
.join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.fi
nd.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d==
=w||a.nodeType!==1||!c(a).is(d));){a.nodeType===
1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if
(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=
a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(
?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|
img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<sc
ript|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=f
unction(a,b,d){return hb.test(d)?
a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend
:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tb
ody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],co
l:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","
</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.ca
ption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</
div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(functio
n(b){var d=
c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return t
his.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return

c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(
d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument
).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function()
{for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d
}).append(this)}return this},
wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wr
apInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents
();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(functi
on(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(
){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:
function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&th
is.appendChild(a)})},
prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType
===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this
[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.
insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.ap
ply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:functi
on(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,functio
n(b){this.parentNode.insertBefore(b,
this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",
arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(
a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f
.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.paren
tNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(
b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*")
);b.firstChild;)b.removeChild(b.firstChild);
return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEv
ent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.cre
ateElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.cle
an([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}
else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.f
ind("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType==
=1?this[0].innerHTML.replace(Ja,
""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace|
|!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try
{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].
getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}
}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().a
ppend(function(){return a.call(this,e,i)})}):this.empty().append(a);return this}
,replaceWith:function(a){if(this[0]&&
this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this
),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).det
ach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(thi
s).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isF
unction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true
)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElem
entsByTagName("tbody")[0]||
u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if
(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))re
turn this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))retu
rn this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domMan
ip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType=
==11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;i
f(j=k.childNodes.length===
1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.leng
th;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.clone
Node(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appen
dTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",repla
ceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=thi
s.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&

&d.length===1){d[b](this[0]);
return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):thi
s).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.sele
ctor)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="
undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=
a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.
test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);va
r o=(La.exec(i)||["",
""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.i
nnerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o===
"table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNo
des:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.leng
th&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r
.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.n
odeType)e.push(i);else e=
c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type
||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].paren
tNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].c
oncat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}ret
urn e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support
.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)fo
r(var k in b.events)e[k]?
c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttri
bute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight
|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/
i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"ab
solute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bott
om"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"css
Float":"styleFloat",ja=
function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,t
rue,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.te
st(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeTyp
e===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d
=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1
;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(
a,"filter")||"";f.filter=
Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?pa
rseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);i
f(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var
e,j=b==="width"?pb:qb;f